public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: hisi_sas: Fix warning detected by sparse
@ 2025-05-15  1:35 Yihang Li
  2025-05-21  2:05 ` Martin K. Petersen
  2025-05-28  2:20 ` Martin K. Petersen
  0 siblings, 2 replies; 7+ messages in thread
From: Yihang Li @ 2025-05-15  1:35 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley
  Cc: linux-scsi, linux-kernel, linuxarm, liyihang9, liuyonglong,
	prime.zeng

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>
---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index d7f45a2eb200..bc5d5356dd00 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -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;
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] scsi: hisi_sas: Fix warning detected by sparse
@ 2023-07-26  5:17 Sunil V L
  2023-07-27  1:14 ` chenxiang (M)
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sunil V L @ 2023-07-26  5:17 UTC (permalink / raw)
  To: linux-scsi, linux-kernel
  Cc: Xiang Chen, James E . J . Bottomley, Martin K . Petersen,
	Palmer Dabbelt, Andrew Jones, Conor Dooley, Sunil V L,
	kernel test robot

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.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307260823.whMNpZ1C-lkp@intel.com/
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 20e1607c6282..6cd2e485d35b 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -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.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-28  2:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-15  1:35 [PATCH] scsi: hisi_sas: Fix warning detected by sparse Yihang Li
2025-05-21  2:05 ` Martin K. Petersen
2025-05-28  2:20 ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2023-07-26  5:17 Sunil V L
2023-07-27  1:14 ` chenxiang (M)
2023-07-31 17:00 ` Martin K. Petersen
2023-08-08  2:50 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox