Re: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/

From: Arnd Bergmann
Date: Tue Nov 21 2023 - 02:23:00 EST


On Tue, Nov 21, 2023, at 07:48, kernel test robot wrote:
>
> If you fix the issue in a separate patch/commit (i.e. not just a new
> version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes:
> https://lore.kernel.org/oe-kbuild-all/202311211441.4LgOiu32-lkp@xxxxxxxxx/
>
> All errors (new ones prefixed by >>):
>
> drivers/pci/iomap.c:27:15: error: redefinition of 'pci_iomap_range'
> void __iomem *pci_iomap_range(struct pci_dev *dev,
> ^
> include/asm-generic/pci_iomap.h:44:29: note: previous definition is here
> static inline void __iomem *pci_iomap_range(struct pci_dev *dev, int bar,
> ^
>>> drivers/pci/iomap.c:43:10: error: call to undeclared function '__pci_ioport_map'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> return __pci_ioport_map(dev, start, len);

>From what I can tell looking at the header, I think we can
just remove the "#elif defined(CONFIG_GENERIC_PCI_IOMAP)"
bit entirely, as it no longer serves the purpose it originally
had.

It also looks like s390 is the only architecture that actually
uses a custom implementation of pci_iomap*(), and this already has

#define pci_iomap pci_iomap
#define pci_iomap_range pci_iomap_range
#define pci_iounmap pci_iounmap
#define pci_iomap_wc pci_iomap_wc
#define pci_iomap_wc_range pci_iomap_wc_range

so the entire CONFIG_GENERIC_PCI_IOMAP symbol can probably
be replaced with individual checks here, using CONFIG_PCI
as the conditional in the Makefile.

Arnd