[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] hw/ufs: Adjust value to match CPU's endian format
From: |
Keoseong Park |
Subject: |
[PATCH] hw/ufs: Adjust value to match CPU's endian format |
Date: |
Tue, 07 Jan 2025 16:02:09 +0900 |
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.
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);
ret = ufs_write_attr_value(u, idn, value);
}
req->rsp_upiu.qr.value = cpu_to_be32(value);
--
2.25.1
- [PATCH] hw/ufs: Adjust value to match CPU's endian format,
Keoseong Park <=