* [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* Re: [PATCH] scsi: hisi_sas: Fix warning detected by sparse
2023-07-26 5:17 [PATCH] scsi: hisi_sas: Fix warning detected by sparse 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
2 siblings, 0 replies; 7+ messages in thread
From: chenxiang (M) @ 2023-07-27 1:14 UTC (permalink / raw)
To: Sunil V L, linux-scsi, linux-kernel
Cc: James E . J . Bottomley, Martin K . Petersen, Palmer Dabbelt,
Andrew Jones, Conor Dooley, kernel test robot
Hi Sunil,
在 2023/7/26 星期三 13:17, 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 * @@
>
> 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>
Reviewed-by: Xiang Chen <chenxiang66@hisilicon.com>
Thanks!
> ---
> 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;
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: hisi_sas: Fix warning detected by sparse
2023-07-26 5:17 [PATCH] scsi: hisi_sas: Fix warning detected by sparse 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
2 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2023-07-31 17:00 UTC (permalink / raw)
To: Sunil V L
Cc: linux-scsi, linux-kernel, Xiang Chen, James E . J . Bottomley,
Martin K . Petersen, Palmer Dabbelt, Andrew Jones, Conor Dooley,
kernel test robot
Sunil,
> LKP reports below warning when building for RISC-V with randconfig
> configuration.
Applied to 6.6/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: hisi_sas: Fix warning detected by sparse
2023-07-26 5:17 [PATCH] scsi: hisi_sas: Fix warning detected by sparse 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
2 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2023-08-08 2:50 UTC (permalink / raw)
To: linux-scsi, linux-kernel, Sunil V L
Cc: Martin K . Petersen, Xiang Chen, James E . J . Bottomley,
Palmer Dabbelt, Andrew Jones, Conor Dooley, kernel test robot
On Wed, 26 Jul 2023 10:47:59 +0530, Sunil V L wrote:
> 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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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* Re: [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
1 sibling, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2025-05-21 2:05 UTC (permalink / raw)
To: Yihang Li
Cc: martin.petersen, James.Bottomley, linux-scsi, linux-kernel,
linuxarm, liuyonglong, prime.zeng
Yihang,
> LKP reports below warning when building for RISC-V with randconfig
> configuration.
Applied to 6.16/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [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
1 sibling, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2025-05-28 2:20 UTC (permalink / raw)
To: James.Bottomley, Yihang Li
Cc: Martin K . Petersen, linux-scsi, linux-kernel, linuxarm,
liuyonglong, prime.zeng
On Thu, 15 May 2025 09:35:04 +0800, Yihang Li wrote:
> 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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [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 --
2023-07-26 5:17 [PATCH] scsi: hisi_sas: Fix warning detected by sparse 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
-- strict thread matches above, loose matches on Subject: below --
2025-05-15 1:35 Yihang Li
2025-05-21 2:05 ` Martin K. Petersen
2025-05-28 2:20 ` 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