* [PATCH 1/1] qla2xxx: Fix sparse warning reported by kbuild bot
@ 2020-02-27 20:11 Himanshu Madhani
2020-02-29 1:10 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Himanshu Madhani @ 2020-02-27 20:11 UTC (permalink / raw
To: James.Bottomley, martin.petersen; +Cc: hmadhani, linux-scsi
this patch fixes following sparse warnings
>> drivers/scsi/qla2xxx/qla_tmpl.c:873:32: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/scsi/qla2xxx/qla_tmpl.c:873:32: sparse: expected unsigned int [usertype] capture_timestamp
>> drivers/scsi/qla2xxx/qla_tmpl.c:873:32: sparse: got restricted __le32 [usertype]
drivers/scsi/qla2xxx/qla_tmpl.c:885:29: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/scsi/qla2xxx/qla_tmpl.c:885:29: sparse: expected unsigned int
vim +873 drivers/scsi/qla2xxx/qla_tmpl.c
869
870 static void
871 qla27xx_time_stamp(struct qla27xx_fwdt_template *tmp)
872 {
> 873 tmp->capture_timestamp = cpu_to_le32(jiffies);
874 }
875
876 static void
877 qla27xx_driver_info(struct qla27xx_fwdt_template *tmp)
878 {
879 uint8_t v[] = { 0, 0, 0, 0, 0, 0 };
880
881 WARN_ON_ONCE(sscanf(qla2x00_version_str,
882 "%hhu.%hhu.%hhu.%hhu.%hhu.%hhu",
883 v+0, v+1, v+2, v+3, v+4, v+5) != 6);
884
> 885 tmp->driver_info[0] = cpu_to_le32(
886 v[3] << 24 | v[2] << 16 | v[1] << 8 | v[0]);
887 tmp->driver_info[1] = cpu_to_le32(v[5] << 8 | v[4]);
888 tmp->driver_info[2] = __constant_cpu_to_le32(0x12345678);
889 }
890
Fixes: a31056ddc665 ("scsi: qla2xxx: Use endian macros to assign static fields in fwdump header")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
---
Hi Martin,
This patch fixes sparse warning introduced by pervious series.
Please apply this patch to 5.7/scsi-queue at your earliest convenience.
Thanks,
Himanshu
---
drivers/scsi/qla2xxx/qla_tmpl.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_tmpl.h b/drivers/scsi/qla2xxx/qla_tmpl.h
index d2a0014e8b21..bba8dc90acfb 100644
--- a/drivers/scsi/qla2xxx/qla_tmpl.h
+++ b/drivers/scsi/qla2xxx/qla_tmpl.h
@@ -18,11 +18,11 @@ struct __packed qla27xx_fwdt_template {
__le32 entry_count;
uint32_t template_version;
- uint32_t capture_timestamp;
+ __le32 capture_timestamp;
uint32_t template_checksum;
uint32_t reserved_2;
- uint32_t driver_info[3];
+ __le32 driver_info[3];
uint32_t saved_state[16];
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] qla2xxx: Fix sparse warning reported by kbuild bot
2020-02-27 20:11 [PATCH 1/1] qla2xxx: Fix sparse warning reported by kbuild bot Himanshu Madhani
@ 2020-02-29 1:10 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2020-02-29 1:10 UTC (permalink / raw
To: Himanshu Madhani; +Cc: James.Bottomley, martin.petersen, linux-scsi
Himanshu,
> this patch fixes following sparse warnings
Applied to 5.7/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-29 1:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27 20:11 [PATCH 1/1] qla2xxx: Fix sparse warning reported by kbuild bot Himanshu Madhani
2020-02-29 1:10 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.