]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: hisi_sas: Fix warning detected by sparse
authorYihang Li <liyihang9@huawei.com>
Thu, 15 May 2025 01:35:04 +0000 (09:35 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 21 May 2025 02:04:48 +0000 (22:04 -0400)
LKP reports below warning when building for RISC-V with randconfig
configuration.

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:4554:25: sparse:
sparse: incorrect type in argument 4 (different base types)
@@     expected restricted __le32 [usertype] *[assigned] ptr
@@     got unsigned int * @@

Type cast to fix this warning.

Fixes: 4ca7fe99fc84 ("scsi: hisi_sas: Use macro instead of magic number")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505150705.k9ZzMxf1-lkp@intel.com/
Signed-off-by: Yihang Li <liyihang9@huawei.com>
Link: https://lore.kernel.org/r/20250515013504.3234016-1-liyihang9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

index d7f45a2eb2006b1ddd975e9ac508f37f7b9ccde2..bc5d5356dd00710277e4b8877798f64c9674d5de 100644 (file)
@@ -4558,7 +4558,7 @@ static int debugfs_fifo_data_v3_hw_show(struct seq_file *s, void *p)
 
        debugfs_show_row_32_v3_hw(s, 0,
                        HISI_SAS_FIFO_DATA_DW_SIZE * HISI_SAS_REG_MEM_SIZE,
-                       phy->fifo.rd_data);
+                       (__le32 *)phy->fifo.rd_data);
 
        return 0;
 }