[PATCH v8 2/3] PCI: Make sure the driver could get correct BAR size from pci_resource_len()

kbuild test robot lkp at intel.com
Sat Jan 21 06:53:11 AEDT 2017


Hi Yongji,

[auto build test WARNING on pci/next]
[also build test WARNING on v4.10-rc4 next-20170120]
[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/Yongji-Xie/PCI-Ignore-requested-alignment-for-IOV-BARs/20170121-031322
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: i386-defconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from drivers/ata/ata_piix.c:88:0:
   drivers/ata/ata_piix.c: In function 'piix_init_sidpr':
>> include/linux/pci.h:1648:44: warning: comparison between 'enum <anonymous>' and 'enum <anonymous>' [-Wenum-compare]
    #define pci_resource_end(dev, bar) (((bar) > PCI_ROM_RESOURCE) ? \
                                               ^
>> include/linux/pci.h:1655:4: note: in expansion of macro 'pci_resource_end'
       pci_resource_end((dev), (bar)) ==  \
       ^~~~~~~~~~~~~~~~
>> drivers/ata/ata_piix.c:1471:6: note: in expansion of macro 'pci_resource_len'
         pci_resource_len(pdev, PIIX_SIDPR_BAR) != PIIX_SIDPR_LEN)
         ^~~~~~~~~~~~~~~~
>> include/linux/pci.h:1648:44: warning: comparison between 'enum <anonymous>' and 'enum <anonymous>' [-Wenum-compare]
    #define pci_resource_end(dev, bar) (((bar) > PCI_ROM_RESOURCE) ? \
                                               ^
   include/linux/pci.h:1658:4: note: in expansion of macro 'pci_resource_end'
      (pci_resource_end((dev), (bar)) -  \
       ^~~~~~~~~~~~~~~~
>> drivers/ata/ata_piix.c:1471:6: note: in expansion of macro 'pci_resource_len'
         pci_resource_len(pdev, PIIX_SIDPR_BAR) != PIIX_SIDPR_LEN)
         ^~~~~~~~~~~~~~~~

vim +1648 include/linux/pci.h

  1642	#define pci_root_bus_fwnode(bus)	NULL
  1643	#endif
  1644	
  1645	/* these helpers provide future and backwards compatibility
  1646	 * for accessing popular PCI BAR info */
  1647	#define pci_resource_start(dev, bar)	((dev)->resource[(bar)].start)
> 1648	#define pci_resource_end(dev, bar)	(((bar) > PCI_ROM_RESOURCE) ?	\
  1649						(dev)->resource[(bar)].end :	\
  1650						((dev)->resource[(bar)].end -	\
  1651						(dev)->res_addsize[(bar)]))
  1652	#define pci_resource_flags(dev, bar)	((dev)->resource[(bar)].flags)
  1653	#define pci_resource_len(dev,bar) \
  1654		((pci_resource_start((dev), (bar)) == 0 &&	\
> 1655		  pci_resource_end((dev), (bar)) ==		\
  1656		  pci_resource_start((dev), (bar))) ? 0 :	\
  1657								\
  1658		 (pci_resource_end((dev), (bar)) -		\

---
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: .config.gz
Type: application/gzip
Size: 25441 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170121/03d596ba/attachment-0001.gz>


More information about the Linuxppc-dev mailing list