Re: [PATCH] scsi: libsas and users: Remove notifier indirection

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

 



Hi John,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next linus/master v5.11-rc3 next-20210111]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/John-Garry/scsi-libsas-and-users-Remove-notifier-indirection/20210112-013419
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/86837fdfa1883e32ec7cbddc1c0905393d4dcb23
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review John-Garry/scsi-libsas-and-users-Remove-notifier-indirection/20210112-013419
        git checkout 86837fdfa1883e32ec7cbddc1c0905393d4dcb23
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/build_bug.h:5,
                    from include/linux/bits.h:22,
                    from include/linux/ioport.h:13,
                    from include/linux/acpi.h:12,
                    from drivers/scsi/hisi_sas/hisi_sas.h:10,
                    from drivers/scsi/hisi_sas/hisi_sas_main.c:7:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_mm.h:174:49: warning: ordered comparison of pointer with null pointer [-Wextra]
     174 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
         |                                                 ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
     137 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
     137 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   drivers/scsi/hisi_sas/hisi_sas_main.c: In function 'hisi_sas_bytes_dmaed':
>> drivers/scsi/hisi_sas/hisi_sas_main.c:619:24: warning: variable 'sas_ha' set but not used [-Wunused-but-set-variable]
     619 |  struct sas_ha_struct *sas_ha;
         |                        ^~~~~~


vim +/sas_ha +619 drivers/scsi/hisi_sas/hisi_sas_main.c

257efd1f69dd1789 John Garry 2015-11-18  614  
66139921973db60c John Garry 2015-11-18  615  static void hisi_sas_bytes_dmaed(struct hisi_hba *hisi_hba, int phy_no)
66139921973db60c John Garry 2015-11-18  616  {
66139921973db60c John Garry 2015-11-18  617  	struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no];
66139921973db60c John Garry 2015-11-18  618  	struct asd_sas_phy *sas_phy = &phy->sas_phy;
66139921973db60c John Garry 2015-11-18 @619  	struct sas_ha_struct *sas_ha;
66139921973db60c John Garry 2015-11-18  620  
66139921973db60c John Garry 2015-11-18  621  	if (!phy->phy_attached)
66139921973db60c John Garry 2015-11-18  622  		return;
66139921973db60c John Garry 2015-11-18  623  
b14a37e011d82940 Xiang Chen 2020-10-02  624  	if (test_bit(HISI_SAS_PM_BIT, &hisi_hba->flags) &&
b14a37e011d82940 Xiang Chen 2020-10-02  625  	    !sas_phy->suspended) {
b14a37e011d82940 Xiang Chen 2020-10-02  626  		dev_warn(hisi_hba->dev, "phy%d during suspend filtered out\n", phy_no);
b14a37e011d82940 Xiang Chen 2020-10-02  627  		return;
b14a37e011d82940 Xiang Chen 2020-10-02  628  	}
b14a37e011d82940 Xiang Chen 2020-10-02  629  
66139921973db60c John Garry 2015-11-18  630  	sas_ha = &hisi_hba->sha;
86837fdfa1883e32 John Garry 2021-01-12  631  	sas_notify_phy_event(sas_phy, PHYE_OOB_DONE);
66139921973db60c John Garry 2015-11-18  632  
66139921973db60c John Garry 2015-11-18  633  	if (sas_phy->phy) {
66139921973db60c John Garry 2015-11-18  634  		struct sas_phy *sphy = sas_phy->phy;
66139921973db60c John Garry 2015-11-18  635  
66139921973db60c John Garry 2015-11-18  636  		sphy->negotiated_linkrate = sas_phy->linkrate;
66139921973db60c John Garry 2015-11-18  637  		sphy->minimum_linkrate_hw = SAS_LINK_RATE_1_5_GBPS;
2ae757871f48c7d3 Xiang Chen 2016-11-07  638  		sphy->maximum_linkrate_hw =
2ae757871f48c7d3 Xiang Chen 2016-11-07  639  			hisi_hba->hw->phy_get_max_linkrate();
2ae757871f48c7d3 Xiang Chen 2016-11-07  640  		if (sphy->minimum_linkrate == SAS_LINK_RATE_UNKNOWN)
2ae757871f48c7d3 Xiang Chen 2016-11-07  641  			sphy->minimum_linkrate = phy->minimum_linkrate;
2ae757871f48c7d3 Xiang Chen 2016-11-07  642  
2ae757871f48c7d3 Xiang Chen 2016-11-07  643  		if (sphy->maximum_linkrate == SAS_LINK_RATE_UNKNOWN)
66139921973db60c John Garry 2015-11-18  644  			sphy->maximum_linkrate = phy->maximum_linkrate;
66139921973db60c John Garry 2015-11-18  645  	}
66139921973db60c John Garry 2015-11-18  646  
66139921973db60c John Garry 2015-11-18  647  	if (phy->phy_type & PORT_TYPE_SAS) {
66139921973db60c John Garry 2015-11-18  648  		struct sas_identify_frame *id;
66139921973db60c John Garry 2015-11-18  649  
66139921973db60c John Garry 2015-11-18  650  		id = (struct sas_identify_frame *)phy->frame_rcvd;
66139921973db60c John Garry 2015-11-18  651  		id->dev_type = phy->identify.device_type;
66139921973db60c John Garry 2015-11-18  652  		id->initiator_bits = SAS_PROTOCOL_ALL;
66139921973db60c John Garry 2015-11-18  653  		id->target_bits = phy->identify.target_port_protocols;
66139921973db60c John Garry 2015-11-18  654  	} else if (phy->phy_type & PORT_TYPE_SATA) {
66139921973db60c John Garry 2015-11-18  655  		/* Nothing */
66139921973db60c John Garry 2015-11-18  656  	}
66139921973db60c John Garry 2015-11-18  657  
66139921973db60c John Garry 2015-11-18  658  	sas_phy->frame_rcvd_size = phy->frame_rcvd_size;
86837fdfa1883e32 John Garry 2021-01-12  659  	sas_notify_port_event(sas_phy, PORTE_BYTES_DMAED);
66139921973db60c John Garry 2015-11-18  660  }
66139921973db60c John Garry 2015-11-18  661  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux