diff options
author | Jaswinder Singh Rajput <jaswinder@kernel.org> | 2009-04-14 23:04:37 +0530 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-15 12:12:36 +0200 |
commit | b206525ad1f653b7da35f5827be93770d28eae11 (patch) | |
tree | faee9afcfa87c4349ee70348a47da980f371dff9 /arch/x86/include | |
parent | 6265ff19ca08df0d96c859ae5e4dc2d9ad07070e (diff) | |
download | talos-op-linux-b206525ad1f653b7da35f5827be93770d28eae11.tar.gz talos-op-linux-b206525ad1f653b7da35f5827be93770d28eae11.zip |
x86: k8 convert node_to_k8_nb_misc() from a macro to an inline function
Converting node_to_k8_nb_misc() from a macro to an inline function
makes compiler see the 'node' parameter in the !CONFIG_K8_NB too,
which eliminates these compiler warnings:
arch/x86/kernel/cpu/intel_cacheinfo.c: In function ‘show_cache_disable’:
arch/x86/kernel/cpu/intel_cacheinfo.c:712: warning: unused variable ‘node’
arch/x86/kernel/cpu/intel_cacheinfo.c: In function ‘store_cache_disable’:
arch/x86/kernel/cpu/intel_cacheinfo.c:739: warning: unused variable ‘node’
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Mark Langsdorf <mark.langsdorf@amd.com>
LKML-Reference: <1239730477.2966.26.camel@ht.satnam>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/k8.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/include/asm/k8.h b/arch/x86/include/asm/k8.h index c23b3d171be5..c2d1f3b58e5f 100644 --- a/arch/x86/include/asm/k8.h +++ b/arch/x86/include/asm/k8.h @@ -13,10 +13,15 @@ extern void k8_flush_garts(void); extern int k8_scan_nodes(unsigned long start, unsigned long end); #ifdef CONFIG_K8_NB -#define node_to_k8_nb_misc(node) \ - (node < num_k8_northbridges) ? k8_northbridges[node] : NULL +static inline struct pci_dev *node_to_k8_nb_misc(int node) +{ + return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL; +} #else -#define node_to_k8_nb_misc(node) NULL +static inline struct pci_dev *node_to_k8_nb_misc(int node) +{ + return NULL; +} #endif |