diff options
| author | Paul Mackerras <paulus@samba.org> | 2005-03-07 19:27:48 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-07 19:27:48 -0800 |
| commit | 7e093c30ae10e1d7fa7f53058a668613995f55eb (patch) | |
| tree | a873c15e9d2a0508819bef02f47e7d09daba7a23 /include | |
| parent | 2cf0110a321cbc5a587c9d09ea2bf4c8e1be330d (diff) | |
[PATCH] ppc64: fix eeh.h compile warnings
This patch is from Nathan Lynch <ntl@pobox.com>.
Use static inlines instead of #defines for stub functions when
CONFIG_EEH=n, to eliminate "statement with no effect" warnings with
some toolchains.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/eeh.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/include/asm-ppc64/eeh.h b/include/asm-ppc64/eeh.h index bcdb5b08cc37..94298b106a4b 100644 --- a/include/asm-ppc64/eeh.h +++ b/include/asm-ppc64/eeh.h @@ -104,17 +104,30 @@ int eeh_unregister_notifier(struct notifier_block *nb); */ #define EEH_IO_ERROR_VALUE(size) (~0U >> ((4 - (size)) * 8)) -#else -#define eeh_init() -#define eeh_check_failure(token, val) (val) -#define eeh_dn_check_failure(dn, dev) (0) -#define pci_addr_cache_build() -#define eeh_add_device_early(dn) -#define eeh_add_device_late(dev) -#define eeh_remove_device(dev) +#else /* !CONFIG_EEH */ +static inline void eeh_init(void) { } + +static inline unsigned long eeh_check_failure(const volatile void __iomem *token, unsigned long val) +{ + return val; +} + +static inline int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) +{ + return 0; +} + +static inline void pci_addr_cache_build(void) { } + +static inline void eeh_add_device_early(struct device_node *dn) { } + +static inline void eeh_add_device_late(struct pci_dev *dev) { } + +static inline void eeh_remove_device(struct pci_dev *dev) { } + #define EEH_POSSIBLE_ERROR(val, type) (0) #define EEH_IO_ERROR_VALUE(size) (-1UL) -#endif +#endif /* CONFIG_EEH */ /* * MMIO read/write operations with EEH support. |
