Re: [PATCH] PCI: Remove unused includes and superfluous struct declaration

2019-09-02 Thread Rob Herring
On Sun,  1 Sep 2019 13:25:06 +0200, Krzysztof Wilczynski wrote:
> Remove  and  from being included
> directly as part of the include/linux/of_pci.h, and remove
> superfluous declaration of struct of_phandle_args.
> 
> Move users of include  to include 
> and  directly rather than rely on both being
> included transitively through .
> 
> Signed-off-by: Krzysztof Wilczynski 
> ---
>  drivers/iommu/of_iommu.c  | 2 ++
>  drivers/pci/controller/dwc/pcie-designware-host.c | 1 +
>  drivers/pci/controller/pci-aardvark.c | 1 +
>  drivers/pci/pci.c | 1 +
>  drivers/pci/probe.c   | 1 +
>  include/linux/of_pci.h| 4 +---
>  6 files changed, 7 insertions(+), 3 deletions(-)
> 

Acked-by: Rob Herring 

___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu


Re: [PATCH] PCI: Remove unused includes and superfluous struct declaration

2019-09-01 Thread kbuild test robot
Hi Krzysztof,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190830]
[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/Krzysztof-Wilczynski/PCI-Remove-unused-includes-and-superfluous-struct-declaration/20190902-040019
config: arm64-defconfig (attached as .config)
compiler: aarch64-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=arm64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/list.h:9:0,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/linux/acpi_iort.h:10,
from drivers/irqchip/irq-gic-v3-its-pci-msi.c:7:
   drivers/irqchip/irq-gic-v3-its-pci-msi.c: In function 
'its_pci_msi_vec_count':
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:37:12: error: implicit declaration 
>> of function 'pci_msi_vec_count'; did you mean 'its_pci_msi_vec_count'? 
>> [-Werror=implicit-function-declaration]
 msi = max(pci_msi_vec_count(pdev), 0);
   ^
   include/linux/kernel.h:821:22: note: in definition of macro '__typecheck'
  (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
 ^
   include/linux/kernel.h:845:24: note: in expansion of macro '__safe_cmp'
 __builtin_choose_expr(__safe_cmp(x, y), \
   ^~
   include/linux/kernel.h:861:19: note: in expansion of macro '__careful_cmp'
#define max(x, y) __careful_cmp(x, y, >)
  ^
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:37:8: note: in expansion of macro 
>> 'max'
 msi = max(pci_msi_vec_count(pdev), 0);
   ^~~
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:38:13: error: implicit declaration 
>> of function 'pci_msix_vec_count'; did you mean 'its_pci_msi_vec_count'? 
>> [-Werror=implicit-function-declaration]
 msix = max(pci_msix_vec_count(pdev), 0);
^
   include/linux/kernel.h:821:22: note: in definition of macro '__typecheck'
  (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
 ^
   include/linux/kernel.h:845:24: note: in expansion of macro '__safe_cmp'
 __builtin_choose_expr(__safe_cmp(x, y), \
   ^~
   include/linux/kernel.h:861:19: note: in expansion of macro '__careful_cmp'
#define max(x, y) __careful_cmp(x, y, >)
  ^
   drivers/irqchip/irq-gic-v3-its-pci-msi.c:38:9: note: in expansion of macro 
'max'
 msix = max(pci_msix_vec_count(pdev), 0);
^~~
   drivers/irqchip/irq-gic-v3-its-pci-msi.c: In function 'its_pci_msi_prepare':
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:60:7: error: implicit declaration 
>> of function 'dev_is_pci'; did you mean 'dev_to_psd'? 
>> [-Werror=implicit-function-declaration]
 if (!dev_is_pci(dev))
  ^~
  dev_to_psd
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:65:9: error: implicit declaration 
>> of function 'to_pci_dev'; did you mean 'atomic_dec'? 
>> [-Werror=implicit-function-declaration]
 pdev = to_pci_dev(dev);
^~
atomic_dec
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:65:7: warning: assignment makes 
>> pointer from integer without a cast [-Wint-conversion]
 pdev = to_pci_dev(dev);
  ^
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:70:2: error: implicit declaration 
>> of function 'pci_for_each_dma_alias'; did you mean 'xas_for_each_conflict'? 
>> [-Werror=implicit-function-declaration]
 pci_for_each_dma_alias(pdev, its_get_pci_alias, &alias_dev);
 ^~
 xas_for_each_conflict
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:71:36: error: dereferencing pointer 
>> to incomplete type 'struct pci_dev'
 if (alias_dev != pdev && alias_dev->subordinate)
   ^~
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:72:3: error: implicit declaration 
>> of function 'pci_walk_bus' [-Werror=implicit-function-declaration]
  pci_walk_bus(alias_dev->subordinate, its_pci_msi_vec_count,
  ^~~~
   cc1: some warnings being treated as errors
--
   drivers/irqchip/irq-gic-v2m.c: In function 'gicv2m_acpi_init':
>> drivers/irqchip/irq-gic-v2m.c:558:2: error: implicit declaration of function 
>> 'pci_msi_register_fwnode_provider'; did you mean 'acpi_bus_register_driver'? 
>> [-Werror=implicit-function-declaration]
 pci_msi_register_fwnode_provider(&gicv2m_

Re: [PATCH] PCI: Remove unused includes and superfluous struct declaration

2019-09-01 Thread kbuild test robot
Hi Krzysztof,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190830]
[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/Krzysztof-Wilczynski/PCI-Remove-unused-includes-and-superfluous-struct-declaration/20190902-040019
config: x86_64-randconfig-f004-201935 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   In file included from :0:0:
   include/linux/of_pci.h: In function 'of_pci_get_devfn':
>> include/linux/of_pci.h:24:10: error: 'EINVAL' undeclared (first use in this 
>> function)
 return -EINVAL;
 ^~
   include/linux/of_pci.h:24:10: note: each undeclared identifier is reported 
only once for each function it appears in

vim +/EINVAL +24 include/linux/of_pci.h

64c5c759084e153 Arnd Bergmann 2014-06-04  21  
64c5c759084e153 Arnd Bergmann 2014-06-04  22  static inline int 
of_pci_get_devfn(struct device_node *np)
64c5c759084e153 Arnd Bergmann 2014-06-04  23  {
64c5c759084e153 Arnd Bergmann 2014-06-04 @24return -EINVAL;
64c5c759084e153 Arnd Bergmann 2014-06-04  25  }
64c5c759084e153 Arnd Bergmann 2014-06-04  26  

:: The code at line 24 was first introduced by commit
:: 64c5c759084e153272eb05f4103de3e0adf5a88a of/irq: provide more wrappers 
for !CONFIG_OF

:: TO: Arnd Bergmann 
:: CC: Rob Herring 

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


.config.gz
Description: application/gzip
___
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu