[PATCH v3 9/9] powerpc/eeh: Convert log messages to eeh_edev_* macros

Sam Bobroff sbobroff at linux.ibm.com
Thu Jul 25 13:33:09 AEST 2019


On Wed, Jul 24, 2019 at 07:47:55PM +1000, Oliver O'Halloran wrote:
> On Wed, Jul 24, 2019 at 7:24 PM kbuild test robot <lkp at intel.com> wrote:
> >
> > Hi Sam,
> >
> > I love your patch! Yet something to improve:
> >
> > [auto build test ERROR on linus/master]
> > [also build test ERROR on v5.3-rc1 next-20190724]
> > [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/Sam-Bobroff/powerpc-64-Adjust-order-in-pcibios_init/20190724-134001
> > config: powerpc-defconfig (attached as .config)
> > compiler: powerpc64-linux-gcc (GCC) 7.4.0
> > reproduce:
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         # save the attached .config to linux build tree
> >         GCC_VERSION=7.4.0 make.cross ARCH=powerpc
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp at intel.com>
> >
> > All errors (new ones prefixed by >>):
> >
> >    arch/powerpc/kernel/eeh_driver.c: In function 'eeh_add_virt_device':
> > >> arch/powerpc/kernel/eeh_driver.c:459:17: error: unused variable 'pdn' [-Werror=unused-variable]
> >      struct pci_dn *pdn = eeh_dev_to_pdn(edev);
> 
> FYI this happens when CONFIG_IOV isn't set. Adding a __maybe_unused
> annotation fixes it.

Ah, thanks. This must be in eeh_add_virt_device().

Since there's now only a single use of pdn in that function, maybe we
can remove the variable, and the IOV case can do this:
	pci_iov_add_virtfn(edev->physfn, eeh_dev_to_pdn(edev)->vf_index);

> >                     ^~~
> >    cc1: all warnings being treated as errors
> >
> > vim +/pdn +459 arch/powerpc/kernel/eeh_driver.c
> >
> > 77bd7415 arch/powerpc/platforms/pseries/eeh_driver.c Linas Vepstas 2005-11-03  454
> > bf773df9 arch/powerpc/kernel/eeh_driver.c            Sam Bobroff   2018-09-12  455  static void *eeh_add_virt_device(struct eeh_dev *edev)
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  456  {
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  457      struct pci_driver *driver;
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  458      struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04 @459      struct pci_dn *pdn = eeh_dev_to_pdn(edev);
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  460
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  461      if (!(edev->physfn)) {
> > 6dad7bbd arch/powerpc/kernel/eeh_driver.c            Sam Bobroff   2019-07-23  462              eeh_edev_warn(edev, "Not for VF\n");
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  463              return NULL;
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  464      }
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  465
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  466      driver = eeh_pcid_get(dev);
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  467      if (driver) {
> > 46d4be41 arch/powerpc/kernel/eeh_driver.c            Sam Bobroff   2018-05-25  468              if (driver->err_handler) {
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  469                      eeh_pcid_put(dev);
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  470                      return NULL;
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  471              }
> > 46d4be41 arch/powerpc/kernel/eeh_driver.c            Sam Bobroff   2018-05-25  472              eeh_pcid_put(dev);
> > 46d4be41 arch/powerpc/kernel/eeh_driver.c            Sam Bobroff   2018-05-25  473      }
> > 67086e32 arch/powerpc/kernel/eeh_driver.c            Wei Yang      2016-03-04  474
> >
> > :::::: The code at line 459 was first introduced by commit
> > :::::: 67086e32b56481531ab1292b284e074b1a8d764c powerpc/eeh: powerpc/eeh: Support error recovery for VF PE
> >
> > :::::: TO: Wei Yang <weiyang at linux.vnet.ibm.com>
> > :::::: CC: Michael Ellerman <mpe at ellerman.id.au>
> >
> > ---
> > 0-DAY kernel test infrastructure                Open Source Technology Center
> > https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190725/3916c8ad/attachment.sig>


More information about the Linuxppc-dev mailing list