]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/83xx: Fix build error when CONFIG_PCI=n
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 10 Feb 2021 13:08:02 +0000 (00:08 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Feb 2021 12:28:51 +0000 (23:28 +1100)
As reported by lkp:

  arch/powerpc/platforms/83xx/km83xx.c:183:19: error: 'mpc83xx_setup_pci' undeclared here (not in a function)
     183 |  .discover_phbs = mpc83xx_setup_pci,
 |                   ^~~~~~~~~~~~~~~~~
 |                   mpc83xx_setup_arch

There is a stub defined for the CONFIG_PCI=n case, but now that
mpc83xx_setup_pci() is being assigned to discover_phbs the correct
empty value is NULL.

Fixes: 83f84041ff1c ("powerpc/83xx: Move PHB discovery")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210210130804.3190952-1-mpe@ellerman.id.au
arch/powerpc/platforms/83xx/mpc83xx.h

index f37d04332fc7c200a6294ae65a018f981d40792c..a30d30588cf6979c086a7f542d91b8f2f31ffbb6 100644 (file)
@@ -76,7 +76,7 @@ extern void mpc83xx_ipic_init_IRQ(void);
 #ifdef CONFIG_PCI
 extern void mpc83xx_setup_pci(void);
 #else
-#define mpc83xx_setup_pci()    do {} while (0)
+#define mpc83xx_setup_pci      NULL
 #endif
 
 extern int mpc83xx_declare_of_platform_devices(void);