Re: [PATCH 11/21] megaraid_sas: Dump system interface regs from sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shivasharan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.1-rc6 next-20190426]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Shivasharan-S/megaraid_sas-Driver-updates/20190426-182011
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/megaraid/megaraid_sas_base.c:96:5: sparse: symbol 'rdpq_enable' was not declared. Should it be static?
   drivers/scsi/megaraid/megaraid_sas_base.c:104:14: sparse: symbol 'scmd_timeout' was not declared. Should it be static?
   drivers/scsi/megaraid/megaraid_sas_base.c:4418:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4418:21:    expected restricted __le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:4418:21:    got int
   drivers/scsi/megaraid/megaraid_sas_base.c:4653:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4653:21:    expected restricted __le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:4653:21:    got int
   drivers/scsi/megaraid/megaraid_sas_base.c:6244:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:6244:21:    expected restricted __le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:6244:21:    got int
   drivers/scsi/megaraid/megaraid_sas_base.c:4325:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4325:21:    expected restricted __le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:4325:21:    got int
   include/linux/slab.h:664:13: sparse: undefined identifier '__builtin_mul_overflow'
   drivers/scsi/megaraid/megaraid_sas_base.c:262:31: sparse: restricted __le16 degrades to integer
   drivers/scsi/megaraid/megaraid_sas_base.c:268:31: sparse: cast from restricted __le16
   drivers/scsi/megaraid/megaraid_sas_base.c:394:29: sparse: cast to restricted __le32
   drivers/scsi/megaraid/megaraid_sas_base.c:1183:32: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [unsigned] [usertype] opcode @@    got ed int [unsigned] [usertype] opcode @@
   drivers/scsi/megaraid/megaraid_sas_base.c:1183:32:    expected unsigned int [unsigned] [usertype] opcode
   drivers/scsi/megaraid/megaraid_sas_base.c:1183:32:    got restricted __le32 [usertype] opcode
   drivers/scsi/megaraid/megaraid_sas_base.c:1881:25: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:1881:25: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:1969:33: sparse: cast to restricted __le32
   drivers/scsi/megaraid/megaraid_sas_base.c:1977:34: sparse: cast to restricted __le32
   drivers/scsi/megaraid/megaraid_sas_base.c:1915:27: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:2918:24: sparse: cast removes address space of expression
>> drivers/scsi/megaraid/megaraid_sas_base.c:2923:41: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:2>*addr @@    got st volatile [noderef] <asn:2>*addr @@
   drivers/scsi/megaraid/megaraid_sas_base.c:2923:41:    expected void const volatile [noderef] <asn:2>*addr
   drivers/scsi/megaraid/megaraid_sas_base.c:2923:41:    got restricted __le32 [usertype] *
   drivers/scsi/megaraid/megaraid_sas_base.c:2923:41: sparse: cast to restricted __le32
   drivers/scsi/megaraid/megaraid_sas_base.c:3275:25: sparse: symbol 'megaraid_host_attrs' was not declared. Should it be static?
   include/linux/slab.h:664:13: sparse: not a function <noident>
   drivers/scsi/megaraid/megaraid_sas_base.c:4541:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4765:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4886:25: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:4886:25: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:4933:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4953:25: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:5013:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:5770:58: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:5770:58: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:5776:42: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:5776:42: sparse: expression using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:5795:42: sparse: cast removes address space of expression
   drivers/scsi/megaraid/megaraid_sas_base.c:5794:57: sparse: incorrect type in assignment (different address spaces) @@    expected unsigned int [noderef] [usertype] <asn:2>*<noident> @@    got eref] [usertype] <asn:2>*<noident> @@
   drivers/scsi/megaraid/megaraid_sas_base.c:5799:34: sparse: cast removes address space of expression
   drivers/scsi/megaraid/megaraid_sas_base.c:5798:57: sparse: incorrect type in assignment (different address spaces) @@    expected unsigned int [noderef] [usertype] <asn:2>*<noident> @@    got eref] [usertype] <asn:2>*<noident> @@
   include/linux/slab.h:664:13: sparse: not a function <noident>
   drivers/scsi/megaraid/megaraid_sas_base.c:6108:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:6322:21: sparse: incorrect type in assignment (different base types) @@    expected restricted __le16 [usertype] flags @@    got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:7049:44: sparse: restricted __le32 degrades to integer
   drivers/scsi/megaraid/megaraid_sas_base.c:7628:23: sparse: incorrect type in assignment (different base types) @@    expected int [signed] crash_support @@    got restrint [signed] crash_support @@
   drivers/scsi/megaraid/megaraid_sas_base.c:7708:31: sparse: invalid assignment: &=
   drivers/scsi/megaraid/megaraid_sas_base.c:7799:36: sparse: incorrect type in assignment (different base types) @@    expected unsigned long [unsigned] [long] <noident> @@    got igned long [unsigned] [long] <noident> @@
   drivers/scsi/megaraid/megaraid_sas_base.c:7801:36: sparse: incorrect type in assignment (different base types) @@    expected unsigned long [unsigned] [long] <noident> @@    got igned long [unsigned] [long] <noident> @@
   drivers/scsi/megaraid/megaraid_sas_base.c:8044:21: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:1>*<noident> @@    got latile [noderef] <asn:1>*<noident> @@
   drivers/scsi/megaraid/megaraid_sas_base.c:8045:21: sparse: incorrect type in argument 1 (different address spaces) @@    expected void const volatile [noderef] <asn:1>*<noident> @@    got atile [noderef] <asn:1>*<noident> @@
   drivers/scsi/megaraid/megaraid_sas_base.c:8243:46: sparse: restricted __le32 degrades to integer
   include/linux/slab.h:664:13: sparse: call with no type!

vim +2923 drivers/scsi/megaraid/megaraid_sas_base.c

  2903	
  2904	/*
  2905	 * megasas_dump_sys_regs - This function will dump system registers through
  2906	 *			    sysfs.
  2907	 * @reg_set:		    Pointer to System register set.
  2908	 * @buf:		    Buffer to which output is to be written.
  2909	 * @return:		    Number of bytes written to buffer.
  2910	 */
  2911	static inline ssize_t
  2912	megasas_dump_sys_regs(void __iomem *reg_set, char *buf)
  2913	{
  2914		unsigned int i, sz = 256;
  2915		int bytes_wrote = 0;
  2916		char *loc = (char *)buf;
  2917	
  2918		__le32 *reg = (__le32 *)reg_set;
  2919	
  2920		for (i = 0; i < sz / sizeof(__le32); i++) {
  2921			bytes_wrote += snprintf(loc + bytes_wrote, PAGE_SIZE,
  2922						"%08x: %08x\n", (i * 4),
> 2923						le32_to_cpu(readl(&reg[i])));
  2924		}
  2925		return bytes_wrote;
  2926	}
  2927	/**
  2928	 * megasas_reset_bus_host -	Bus & host reset handler entry point
  2929	 */
  2930	static int megasas_reset_bus_host(struct scsi_cmnd *scmd)
  2931	{
  2932		int ret;
  2933		struct megasas_instance *instance;
  2934	
  2935		instance = (struct megasas_instance *)scmd->device->host->hostdata;
  2936	
  2937		scmd_printk(KERN_INFO, scmd,
  2938			"OCR is requested due to IO timeout!!\n");
  2939	
  2940		scmd_printk(KERN_INFO, scmd,
  2941			"SCSI host state: %d  SCSI host busy: %d  FW outstanding: %d\n",
  2942			scmd->device->host->shost_state,
  2943			scsi_host_busy(scmd->device->host),
  2944			atomic_read(&instance->fw_outstanding));
  2945		/*
  2946		 * First wait for all commands to complete
  2947		 */
  2948		if (instance->adapter_type == MFI_SERIES) {
  2949			ret = megasas_generic_reset(scmd);
  2950		} else {
  2951			megasas_dump_fusion_io(scmd);
  2952			ret = megasas_reset_fusion(scmd->device->host,
  2953					SCSIIO_TIMEOUT_OCR);
  2954		}
  2955	
  2956		return ret;
  2957	}
  2958	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux