Skip to contentSkip to conversation

x86: cpu/cpu.h cleanup

PATCH In review Jaswinder Singh Rajput 2 participants 2 messages Mar 22, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: cpu/cpu.h cleanup

Hello Ingo,

Is it worth to move arch/x86/kernel/cpu/cpu.h data to asm/cpu.h and if required we can also make it private like:
#ifdef __KERNEL__
#ifndef MODULE
private data for kernel only
#endif
#endif

By this way we move header files to include directory. Or you have some better option.

From: Jaswinder Singh Rajput <[email protected]>
Date: Sun, 22 Mar 2009 13:28:39 +0530
Subject: [PATCH] x86: cpu/cpu.h cleanup

Impact: cleanup

- Fix various style issues

---
 arch/x86/kernel/cpu/cpu.h |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
arch/x86/kernel/cpu/cpu.h +10 -10
index 9469ecb..6de9a90 100644
@@ -3,25 +3,25 @@
 #define ARCH_X86_CPU_H
 
 struct cpu_model_info {
-	int vendor;
-	int family;
-	const char *model_names[16];
+	int		vendor;
+	int		family;
+	const char	*model_names[16];
 };
 
 /* attempt to consolidate cpu attributes */
 struct cpu_dev {
-	const char	* c_vendor;
+	const char	*c_vendor;
 
 	/* some have two possibilities for cpuid string */
-	const char	* c_ident[2];
+	const char	*c_ident[2];
 
 	struct		cpu_model_info c_models[4];
 
-	void            (*c_early_init)(struct cpuinfo_x86 *c);
-	void		(*c_init)(struct cpuinfo_x86 * c);
-	void		(*c_identify)(struct cpuinfo_x86 * c);
-	unsigned int	(*c_size_cache)(struct cpuinfo_x86 * c, unsigned int size);
-	int	c_x86_vendor;
+	void            (*c_early_init)(struct cpuinfo_x86 *);
+	void		(*c_init)(struct cpuinfo_x86 *);
+	void		(*c_identify)(struct cpuinfo_x86 *);
+	unsigned int	(*c_size_cache)(struct cpuinfo_x86 *, unsigned int);
+	int		c_x86_vendor;
 };
 
 #define cpu_dev_register(cpu_devX) \
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 10 lines · Jaswinder Singh Rajput

Is it worth to move arch/x86/kernel/cpu/cpu.h data to asm/cpu.h and if required we can also make it private like:
#ifdef __KERNEL__
#ifndef MODULE
private data for kernel only
#endif
#endif

By this way we move header files to include directory. Or you have some better option.

There is no option at all. The header files which are in source directories stay just where they are.

They are there for a reason. Have you even looked which files include arch/x86/kernel/cpu/cpu.h ?

Thanks,

tglx