Skip to content

Commit 73185a1

Browse files
beanhuomartinkpetersen
authored andcommitted
scsi: ufs: ufshpb: Fix warning in ufshpb_set_hpb_read_to_upiu()
Fix the following sparse warnings in ufshpb_set_hpb_read_to_upiu(): sparse warnings: (new ones prefixed by >>) drivers/scsi/ufs/ufshpb.c:335:27: sparse: sparse: cast from restricted __be64 drivers/scsi/ufs/ufshpb.c:335:25: sparse: expected restricted __be64 [usertype] ppn_tmp drivers/scsi/ufs/ufshpb.c:335:25: sparse: got unsigned long long [usertype] Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Bean Huo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 3920068 commit 73185a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/scsi/ufs/ufshpb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ ufshpb_set_hpb_read_to_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp,
331331
cdb[0] = UFSHPB_READ;
332332

333333
if (hba->dev_quirks & UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ)
334-
ppn_tmp = swab64(ppn);
334+
ppn_tmp = (__force __be64)swab64((__force u64)ppn);
335335

336336
/* ppn value is stored as big-endian in the host memory */
337337
memcpy(&cdb[6], &ppn_tmp, sizeof(__be64));

0 commit comments

Comments
 (0)