arch/arm/mach-ixp4xx/common.c:341:7: error: implicit declaration of function 'is_pci_memory'

From: kernel test robot
Date: Sat Jul 10 2021 - 23:39:22 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: de5540965853e514a85d3b775e9049deb85a2ff3
commit: d5d9f7ac58ea1041375a028f143ca5784693ea86 ARM/ixp4xx: Make NEED_MACH_IO_H optional
date: 4 weeks ago
config: arm-randconfig-r016-20210711 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8d69635ed9ecf36fd0ca85906bfde17949671cbe)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5d9f7ac58ea1041375a028f143ca5784693ea86
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d5d9f7ac58ea1041375a028f143ca5784693ea86
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> arch/arm/mach-ixp4xx/common.c:341:7: error: implicit declaration of function 'is_pci_memory' [-Werror,-Wimplicit-function-declaration]
if (!is_pci_memory(addr))
^
arch/arm/mach-ixp4xx/common.c:349:7: error: implicit declaration of function 'is_pci_memory' [-Werror,-Wimplicit-function-declaration]
if (!is_pci_memory((__force u32)addr))
^
2 errors generated.
--
>> arch/arm/mach-ixp4xx/vulcan-setup.c:67:13: error: use of undeclared identifier 'IXP4XX_UART1_BASE_PHYS'
.start = IXP4XX_UART1_BASE_PHYS,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:68:11: error: use of undeclared identifier 'IXP4XX_UART1_BASE_PHYS'
.end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:72:13: error: use of undeclared identifier 'IXP4XX_UART2_BASE_PHYS'
.start = IXP4XX_UART2_BASE_PHYS,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:73:11: error: use of undeclared identifier 'IXP4XX_UART2_BASE_PHYS'
.end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:83:14: error: use of undeclared identifier 'IXP4XX_UART1_BASE_PHYS'
.mapbase = IXP4XX_UART1_BASE_PHYS,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:84:22: error: use of undeclared identifier 'IXP4XX_UART1_BASE_VIRT'
.membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:84:47: error: use of undeclared identifier 'REG_OFFSET'
.membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:89:14: error: use of undeclared identifier 'IXP4XX_UART_XTAL'
.uartclk = IXP4XX_UART_XTAL,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:92:14: error: use of undeclared identifier 'IXP4XX_UART2_BASE_PHYS'
.mapbase = IXP4XX_UART2_BASE_PHYS,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:93:22: error: use of undeclared identifier 'IXP4XX_UART2_BASE_VIRT'
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:93:47: error: use of undeclared identifier 'REG_OFFSET'
.membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:98:14: error: use of undeclared identifier 'IXP4XX_UART_XTAL'
.uartclk = IXP4XX_UART_XTAL,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:124:20: error: invalid application of 'sizeof' to an incomplete type 'struct resource []'
.num_resources = ARRAY_SIZE(vulcan_uart_resources),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:42:32: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~
>> arch/arm/mach-ixp4xx/vulcan-setup.c:129:13: error: use of undeclared identifier 'IXP4XX_EthB_BASE_PHYS'
.start = IXP4XX_EthB_BASE_PHYS,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:130:11: error: use of undeclared identifier 'IXP4XX_EthB_BASE_PHYS'
.end = IXP4XX_EthB_BASE_PHYS + 0x0fff,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:137:13: error: use of undeclared identifier 'IXP4XX_EthC_BASE_PHYS'
.start = IXP4XX_EthC_BASE_PHYS,
^
arch/arm/mach-ixp4xx/vulcan-setup.c:138:11: error: use of undeclared identifier 'IXP4XX_EthC_BASE_PHYS'
.end = IXP4XX_EthC_BASE_PHYS + 0x0fff,
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:143:44: error: array has incomplete element type 'struct eth_plat_info'
static struct eth_plat_info vulcan_plat_eth[] = {
^
arch/arm/mach-ixp4xx/vulcan-setup.c:143:15: note: forward declaration of 'struct eth_plat_info'
static struct eth_plat_info vulcan_plat_eth[] = {
^
>> arch/arm/mach-ixp4xx/vulcan-setup.c:159:11: error: use of undeclared identifier 'IXP4XX_ETH_NPEB'
.id = IXP4XX_ETH_NPEB,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
--
>> arch/arm/mach-ixp4xx/nas100d-pci.c:39:2: error: implicit declaration of function 'ixp4xx_pci_preinit' [-Werror,-Wimplicit-function-declaration]
ixp4xx_pci_preinit();
^
arch/arm/mach-ixp4xx/nas100d-pci.c:39:2: note: did you mean 'iop3xx_pci_preinit'?
arch/arm/include/asm/mach/pci.h:78:13: note: 'iop3xx_pci_preinit' declared here
extern void iop3xx_pci_preinit(void);
^
arch/arm/mach-ixp4xx/nas100d-pci.c:32:13: warning: no previous prototype for function 'nas100d_pci_preinit' [-Wmissing-prototypes]
void __init nas100d_pci_preinit(void)
^
arch/arm/mach-ixp4xx/nas100d-pci.c:32:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init nas100d_pci_preinit(void)
^
static
>> arch/arm/mach-ixp4xx/nas100d-pci.c:59:11: error: use of undeclared identifier 'ixp4xx_ops'; did you mean 'iop3xx_ops'?
.ops = &ixp4xx_ops,
^~~~~~~~~~
iop3xx_ops
arch/arm/include/asm/mach/pci.h:76:23: note: 'iop3xx_ops' declared here
extern struct pci_ops iop3xx_ops;
^
>> arch/arm/mach-ixp4xx/nas100d-pci.c:61:12: error: use of undeclared identifier 'ixp4xx_setup'
.setup = ixp4xx_setup,
^
arch/arm/mach-ixp4xx/nas100d-pci.c:65:12: warning: no previous prototype for function 'nas100d_pci_init' [-Wmissing-prototypes]
int __init nas100d_pci_init(void)
^
arch/arm/mach-ixp4xx/nas100d-pci.c:65:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __init nas100d_pci_init(void)
^
static
2 warnings and 3 errors generated.
--
>> arch/arm/mach-ixp4xx/vulcan-pci.c:41:2: error: implicit declaration of function 'ixp4xx_pci_preinit' [-Werror,-Wimplicit-function-declaration]
ixp4xx_pci_preinit();
^
arch/arm/mach-ixp4xx/vulcan-pci.c:41:2: note: did you mean 'iop3xx_pci_preinit'?
arch/arm/include/asm/mach/pci.h:78:13: note: 'iop3xx_pci_preinit' declared here
extern void iop3xx_pci_preinit(void);
^
arch/arm/mach-ixp4xx/vulcan-pci.c:26:13: warning: no previous prototype for function 'vulcan_pci_preinit' [-Wmissing-prototypes]
void __init vulcan_pci_preinit(void)
^
arch/arm/mach-ixp4xx/vulcan-pci.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init vulcan_pci_preinit(void)
^
static
>> arch/arm/mach-ixp4xx/vulcan-pci.c:57:11: error: use of undeclared identifier 'ixp4xx_ops'; did you mean 'iop3xx_ops'?
.ops = &ixp4xx_ops,
^~~~~~~~~~
iop3xx_ops
arch/arm/include/asm/mach/pci.h:76:23: note: 'iop3xx_ops' declared here
extern struct pci_ops iop3xx_ops;
^
>> arch/arm/mach-ixp4xx/vulcan-pci.c:59:12: error: use of undeclared identifier 'ixp4xx_setup'
.setup = ixp4xx_setup,
^
arch/arm/mach-ixp4xx/vulcan-pci.c:63:12: warning: no previous prototype for function 'vulcan_pci_init' [-Wmissing-prototypes]
int __init vulcan_pci_init(void)
^
arch/arm/mach-ixp4xx/vulcan-pci.c:63:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __init vulcan_pci_init(void)
^
static
2 warnings and 3 errors generated.

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for QCOM_SCM
Depends on (ARM || ARM64) && HAVE_ARM_SMCCC
Selected by
- ARM_QCOM_SPM_CPUIDLE && CPU_IDLE && (ARM || ARM64) && (ARCH_QCOM || COMPILE_TEST && !ARM64 && MMU


vim +/is_pci_memory +341 arch/arm/mach-ixp4xx/common.c

00e1b3a3d196ae Krzysztof Halasa 2014-03-23 329
f449588c65e236 Rob Herring 2012-03-06 330 #ifdef CONFIG_IXP4XX_INDIRECT_PCI
f449588c65e236 Rob Herring 2012-03-06 331 /*
f449588c65e236 Rob Herring 2012-03-06 332 * In the case of using indirect PCI, we simply return the actual PCI
f449588c65e236 Rob Herring 2012-03-06 333 * address and our read/write implementation use that to drive the
f449588c65e236 Rob Herring 2012-03-06 334 * access registers. If something outside of PCI is ioremap'd, we
f449588c65e236 Rob Herring 2012-03-06 335 * fallback to the default.
f449588c65e236 Rob Herring 2012-03-06 336 */
f449588c65e236 Rob Herring 2012-03-06 337
9b97173e785a54 Laura Abbott 2013-05-16 338 static void __iomem *ixp4xx_ioremap_caller(phys_addr_t addr, size_t size,
f449588c65e236 Rob Herring 2012-03-06 339 unsigned int mtype, void *caller)
f449588c65e236 Rob Herring 2012-03-06 340 {
f449588c65e236 Rob Herring 2012-03-06 @341 if (!is_pci_memory(addr))
f449588c65e236 Rob Herring 2012-03-06 342 return __arm_ioremap_caller(addr, size, mtype, caller);
f449588c65e236 Rob Herring 2012-03-06 343
f449588c65e236 Rob Herring 2012-03-06 344 return (void __iomem *)addr;
f449588c65e236 Rob Herring 2012-03-06 345 }
f449588c65e236 Rob Herring 2012-03-06 346

:::::: The code at line 341 was first introduced by commit
:::::: f449588c65e23637aef59cae2ea7b6b2b1b767ec ARM: ixp4xx: use runtime ioremap hook

:::::: TO: Rob Herring <rob.herring@xxxxxxxxxxx>
:::::: CC: Rob Herring <rob.herring@xxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip