]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Stub __pci_ioport_map() for arches that don't support it at all
authorStafford Horne <shorne@gmail.com>
Fri, 22 Jul 2022 21:22:48 +0000 (06:22 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 29 Jul 2022 17:01:00 +0000 (12:01 -0500)
commit5518f8e1c9f9d0215da7d5676f9aa037b312fe12
treed74cf4dde639e9cae48c7108c985b344cd04cc46
parent2a60524d02f283b0dddf0e47c14d7304ca43cd9c
PCI: Stub __pci_ioport_map() for arches that don't support it at all

When building OpenRISC PCI, which has no ioport_map(), we get the following
build error:

  lib/pci_iomap.c: In function 'pci_iomap_range':
    CC      drivers/i2c/i2c-core-base.o
  ./include/asm-generic/pci_iomap.h:29:41: error: implicit declaration of function 'ioport_map'; did you mean 'ioremap'? [-Werror=implicit-function-declaration]
     29 | #define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr))
|                                         ^~~~~~~~~~
  lib/pci_iomap.c:44:24: note: in expansion of macro '__pci_ioport_map'
     44 |                 return __pci_ioport_map(dev, start, len);
|                        ^~~~~~~~~~~~~~~~

Add a NULL definition of __pci_ioport_map() for architectures that do not
support ioport_map().

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20220722212248.802500-1-shorne@gmail.com
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
include/asm-generic/pci_iomap.h