qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/ufs: Adjust value to match CPU's endian format


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] hw/ufs: Adjust value to match CPU's endian format
Date: Tue, 7 Jan 2025 08:28:19 +0100
User-agent: Mozilla Thunderbird

On 7/1/25 08:02, Keoseong Park wrote:
In ufs_write_attr_value(), the value parameter is handled in the CPU's
endian format but provided in big-endian format by the caller. Thus, it
is converted accordingly.


Fixes: 7c85332a2b3 ("hw/ufs: minor bug fixes related to ufs-test")

Signed-off-by: Keoseong Park <keosung.park@samsung.com>
---
  hw/ufs/ufs.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ufs/ufs.c b/hw/ufs/ufs.c
index 8d26d13791..428fe927ad 100644
--- a/hw/ufs/ufs.c
+++ b/hw/ufs/ufs.c
@@ -1164,7 +1164,7 @@ static QueryRespCode ufs_exec_query_attr(UfsRequest *req, 
int op)
          value = ufs_read_attr_value(u, idn);
          ret = UFS_QUERY_RESULT_SUCCESS;
      } else {
-        value = req->req_upiu.qr.value;
+        value = be32_to_cpu(req->req_upiu.qr.value);

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

          ret = ufs_write_attr_value(u, idn, value);
      }
      req->rsp_upiu.qr.value = cpu_to_be32(value);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]