From: Gavin Shan Date: Tue, 1 Mar 2016 05:02:43 +0000 (+1100) Subject: powerpc/eeh: Fix build error caused by pci_dn X-Git-Tag: v4.1.19~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35cc814663e4f3515fb6bae8a3b5c188aa2b6f89;p=thirdparty%2Fkernel%2Fstable.git powerpc/eeh: Fix build error caused by pci_dn eeh.h could be included when we have following condition. Then we run into build error as below: (CONFIG_PPC64 && !CONFIG_EEH) || (!CONFIG_PPC64 && !CONFIG_EEH) In file included from arch/powerpc/kernel/of_platform.c:30:0: ./arch/powerpc/include/asm/eeh.h:344:48: error: ‘struct pci_dn’ \ declared inside parameter list [-Werror] : In file included from arch/powerpc/mm/hash_utils_64.c:49:0: ./arch/powerpc/include/asm/eeh.h:344:48: error: ‘struct pci_dn’ \ declared inside parameter list [-Werror] This fixes the issue by replacing those empty inline functions with macro so that we don't rely on @pci_dn when CONFIG_EEH is disabled. Cc: stable@vger.kernel.org # v4.1+ Fixes: ff57b45 ("powerpc/eeh: Do probe on pci_dn") Reported-by: Guenter Roeck Signed-off-by: Gavin Shan Signed-off-by: Sasha Levin --- diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index e4de79abfe703..4457cb605356d 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h @@ -337,19 +337,13 @@ static inline int eeh_check_failure(const volatile void __iomem *token) #define eeh_dev_check_failure(x) (0) -static inline void eeh_addr_cache_build(void) { } - -static inline void eeh_add_device_early(struct pci_dn *pdn) { } - -static inline void eeh_add_device_tree_early(struct pci_dn *pdn) { } - -static inline void eeh_add_device_late(struct pci_dev *dev) { } - -static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } - -static inline void eeh_add_sysfs_files(struct pci_bus *bus) { } - -static inline void eeh_remove_device(struct pci_dev *dev) { } +#define eeh_addr_cache_build() +#define eeh_add_device_early(pdn) +#define eeh_add_device_tree_early(pdn) +#define eeh_add_device_late(pdev) +#define eeh_add_device_tree_late(pbus) +#define eeh_add_sysfs_files(pbus) +#define eeh_remove_device(pdev) #define EEH_POSSIBLE_ERROR(val, type) (0) #define EEH_IO_ERROR_VALUE(size) (-1UL)