tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 5c63bd0fa5e86474d30ecd06d67f2393de081434 commit: bee9d00acd7e651a6ec989ef3e7b1309b24469af [1567/23811] scsi: hisi_sas: Add DFX Feature: Global register create file and add file operations config: arm64-randconfig-r111-20241003 (https://download.01.org/0day-ci/archive/20241004/202410040348.tx3GNMPZ-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.1.0 reproduce: (https://download.01.org/0day-ci/archive/20241004/202410040348.tx3GNMPZ-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202410040348.tx3GNMPZ-lkp@intel.com/
sparse warnings: (new ones prefixed by >>) drivers/scsi/hisi_sas/hisi_sas_main.c:1603:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1603:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1603:52: sparse: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:1857:52: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed @@ got restricted __le16 [usertype] @@ drivers/scsi/hisi_sas/hisi_sas_main.c:1857:52: sparse: expected unsigned short [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1857:52: sparse: got restricted __le16 [usertype] drivers/scsi/hisi_sas/hisi_sas_main.c:2664:12: sparse: sparse: symbol 'hisi_sas_reg_name' was not declared. Should it be static?
drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2692:33: sparse: sparse: cast to restricted __le32
drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2697:33: sparse: sparse: cast to restricted __le32 drivers/scsi/hisi_sas/hisi_sas_main.c:2664:13: warning: no previous prototype for 'hisi_sas_reg_name' [-Wmissing-prototypes] 2664 | const char *hisi_sas_reg_name(int off, | ^~~~~~~~~~~~~~~~~ In file included from include/scsi/libsas.h:36, from include/scsi/sas_ata.h:29, from drivers/scsi/hisi_sas/hisi_sas.h:28, from drivers/scsi/hisi_sas/hisi_sas_main.c:12: In function 'scsi_prot_sglist', inlined from 'hisi_sas_dif_dma_map' at drivers/scsi/hisi_sas/hisi_sas_main.c:442:2: include/scsi/scsi_cmnd.h:327:19: warning: 'scsi_cmnd' may be used uninitialized [-Wmaybe-uninitialized] 327 | return cmd->prot_sdb ? cmd->prot_sdb->table.sgl : NULL; | ~~~^~~~~~~~~~ drivers/scsi/hisi_sas/hisi_sas_main.c: In function 'hisi_sas_dif_dma_map': drivers/scsi/hisi_sas/hisi_sas_main.c:412:27: note: 'scsi_cmnd' was declared here 412 | struct scsi_cmnd *scsi_cmnd; | ^~~~~~~~~
vim +2692 drivers/scsi/hisi_sas/hisi_sas_main.c
2675 2676 static void hisi_sas_print_reg(u32 *regs_val, 2677 const void *ptr, 2678 struct seq_file *s) 2679 { 2680 const struct hisi_sas_debugfs_reg *reg = ptr; 2681 int i; 2682 2683 for (i = 0; i < reg->count; i++) { 2684 int off = i * 4; 2685 const char *name = hisi_sas_reg_name(off, 2686 reg->base_off, 2687 reg->lu); 2688 2689 if (name) 2690 seq_printf(s, "0x%08x 0x%08x %s\n", 2691 off,
2692 le32_to_cpu(regs_val[i]),
2693 name); 2694 else 2695 seq_printf(s, "0x%08x 0x%08x\n", 2696 off, 2697 le32_to_cpu(regs_val[i])); 2698 } 2699 } 2700