]> Git Repo - J-linux.git/commitdiff
x86: k8 convert node_to_k8_nb_misc() from a macro to an inline function
authorJaswinder Singh Rajput <[email protected]>
Tue, 14 Apr 2009 17:34:37 +0000 (23:04 +0530)
committerIngo Molnar <[email protected]>
Wed, 15 Apr 2009 10:12:36 +0000 (12:12 +0200)
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 <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Mark Langsdorf <[email protected]>
LKML-Reference: <1239730477[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/include/asm/k8.h

index c23b3d171be5feeee11b01f7f7bc13ef28a65e50..c2d1f3b58e5f1342607280be6a71d434796482dd 100644 (file)
@@ -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
 
 
This page took 0.037959 seconds and 4 git commands to generate.