[PATCH 2/2 v2] x86: remove unused function, register the cpu vendor in nexgen.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dmitri Vorobiev
Date: Sunday, April 20, 2008 - 3:33 am

Nobody calls the function nexgen_init_cpu(), which is defined
in arch/x86/kernel/cpu/nexgen.c. Therefore this routine can
be removed, and this patch does so.

Additionally, this patch adds the missing registration of the
NexGen CPUs by the cpu_vendor_dev_register() macro.

This patch was build-tested using the defconfig for i386. It
also survived a few randconfig instances. Runtime tests were
performed by booting an i386 box up to the shell prompt.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
Peter,

Thanks for your review. Hopefully this version is OK.

 arch/x86/kernel/cpu/nexgen.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/nexgen.c b/arch/x86/kernel/cpu/nexgen.c
index 5d5e1c1..3117e96 100644
--- a/arch/x86/kernel/cpu/nexgen.c
+++ b/arch/x86/kernel/cpu/nexgen.c
@@ -52,8 +52,4 @@ static struct cpu_dev nexgen_cpu_dev __cpuinitdata = {
 	.c_identify	= nexgen_identify,
 };
 
-int __init nexgen_init_cpu(void)
-{
-	cpu_devs[X86_VENDOR_NEXGEN] = &nexgen_cpu_dev;
-	return 0;
-}
+cpu_vendor_dev_register(X86_VENDOR_NEXGEN, &nexgen_cpu_dev);
-- 
1.5.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] x86: random clean-ups, Dmitri Vorobiev, (Sat Apr 19, 7:54 pm)
[PATCH 1/4] x86: remove unused function amd_init_cpu(), Dmitri Vorobiev, (Sat Apr 19, 7:54 pm)
[PATCH 2/4] x86: remove unused code and data in nexgen.c, Dmitri Vorobiev, (Sat Apr 19, 7:54 pm)
[PATCH 2/2 v2] x86: remove unused function, register the c ..., Dmitri Vorobiev, (Sun Apr 20, 3:33 am)
Re: [PATCH 2/4] x86: remove unused code and data in nexgen.c, Dmitri Vorobiev, (Sun Apr 20, 12:24 pm)
Re: [PATCH 2/4] x86: remove unused code and data in nexgen.c, H. Peter Anvin, (Sun Apr 20, 12:34 pm)
Re: [PATCH 2/4] x86: remove unused code and data in nexgen.c, Dmitri Vorobiev, (Sun Apr 20, 12:45 pm)
Re: [PATCH 2/4] x86: remove unused code and data in nexgen.c, H. Peter Anvin, (Sun Apr 20, 12:47 pm)
Re: [PATCH 0/4] x86: random clean-ups, Ingo Molnar, (Mon Apr 21, 5:25 am)
Re: [PATCH 2/4] x86: remove unused code and data in nexgen.c, Dmitri Vorobiev, (Wed Apr 23, 12:02 pm)