Skip to contentSkip to conversation

scsi: hisi_sas: Fix warning detected by sparse

PATCH Applied Yihang Li 2 participants 3 messages May 15, 2025 – May 28, 2025

Subsystems (2)
lore
Share & tools
lore

Yihang Li

author
#0 lore raw

PATCH 1/1 scsi: hisi_sas: Fix warning detected by sparse

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")
---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +1 -1
index d7f45a2eb200..bc5d5356dd00 100644
@@ -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;
 }
Signature · 1 line
2.33.0
#1 lore raw

Yihang,

Quoted 2 lines

LKP reports below warning when building for RISC-V with randconfig configuration.

Applied to 6.16/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen
#2 lore raw
In reply to Yihang Li
Quoted 9 lines · Yihang Li

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 * @@

[...]

Applied to 6.16/scsi-queue, thanks!

[1/1] scsi: hisi_sas: Fix warning detected by sparse

      https://git.kernel.org/mkp/scsi/c/0c52f621f5be
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering