mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
UPSTREAM: scsi: ufs: Use get_unaligned_be16() instead of be16_to_cpup()
Use get_unaligned_be16(...) instead of the equivalent but harder to read
be16_to_cpup((__be16 *)...).
Link: https://lore.kernel.org/r/20220419225811.4127248-8-bvanassche@acm.org
Tested-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Bug: 234653003
(cherry picked from commit 9d3ab17e84)
Change-Id: Iafcdacc6059eda4cf720a71bb3882a34a9b45984
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
committed by
Bart Van Assche
parent
7a975b5e5d
commit
5f8fd2d6c9
@@ -7411,7 +7411,7 @@ static u32 ufshcd_get_max_icc_level(int sup_curr_uA, u32 start_scan, char *buff)
|
||||
u16 unit;
|
||||
|
||||
for (i = start_scan; i >= 0; i--) {
|
||||
data = be16_to_cpup((__be16 *)&buff[2 * i]);
|
||||
data = get_unaligned_be16(&buff[2 * i]);
|
||||
unit = (data & ATTR_ICC_LVL_UNIT_MASK) >>
|
||||
ATTR_ICC_LVL_UNIT_OFFSET;
|
||||
curr_uA = data & ATTR_ICC_LVL_VALUE_MASK;
|
||||
|
||||
Reference in New Issue
Block a user