Skip to contentSkip to conversation

scsi: hisi_sas: Fix warning detected by sparse

PATCH Applied Sunil V L 3 participants 4 messages Jul 26, 2023 – Aug 8, 2023

Subsystems (2)
lore
Share & tools
lore

Sunil V L

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:4567:35: 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.

---
 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 20e1607c6282..6cd2e485d35b 100644
@@ -4576,7 +4576,7 @@ static int debugfs_fifo_data_v3_hw_show(struct seq_file *s, void *p)
 	debugfs_read_fifo_data_v3_hw(phy);
 
 	debugfs_show_row_32_v3_hw(s, 0, HISI_SAS_FIFO_DATA_DW_SIZE * 4,
-				  phy->fifo.rd_data);
+				  (__le32 *)phy->fifo.rd_data);
 
 	return 0;
 }
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Sunil,

Quoted 8 lines · Sunil V L

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

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

Quoted 5 lines

Type cast to fix this warning.

Thanks!

Quoted 17 lines
---
  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 20e1607c6282..6cd2e485d35b 100644
@@ -4576,7 +4576,7 @@ static int debugfs_fifo_data_v3_hw_show(struct seq_file *s, void *p)
  	debugfs_read_fifo_data_v3_hw(phy);
 
  	debugfs_show_row_32_v3_hw(s, 0, HISI_SAS_FIFO_DATA_DW_SIZE * 4,
-				  phy->fifo.rd_data);
+				  (__le32 *)phy->fifo.rd_data);
 
  	return 0;
  }
#2 lore raw
In reply to Sunil V L

Sunil,

Quoted 2 lines

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

Applied to 6.6/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#3 lore raw
In reply to Sunil V L
Quoted 9 lines · Sunil V L

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

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

[...]

Applied to 6.6/scsi-queue, thanks!

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

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