mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 16:41:58 +00:00
b206525ad1
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>
29 lines
634 B
C
29 lines
634 B
C
#ifndef _ASM_X86_K8_H
|
|
#define _ASM_X86_K8_H
|
|
|
|
#include <linux/pci.h>
|
|
|
|
extern struct pci_device_id k8_nb_ids[];
|
|
|
|
extern int early_is_k8_nb(u32 value);
|
|
extern struct pci_dev **k8_northbridges;
|
|
extern int num_k8_northbridges;
|
|
extern int cache_k8_northbridges(void);
|
|
extern void k8_flush_garts(void);
|
|
extern int k8_scan_nodes(unsigned long start, unsigned long end);
|
|
|
|
#ifdef CONFIG_K8_NB
|
|
static inline struct pci_dev *node_to_k8_nb_misc(int node)
|
|
{
|
|
return (node < num_k8_northbridges) ? k8_northbridges[node] : NULL;
|
|
}
|
|
#else
|
|
static inline struct pci_dev *node_to_k8_nb_misc(int node)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif /* _ASM_X86_K8_H */
|