diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-09-06 04:52:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-06 08:09:12 -0400 |
commit | 1b05d60d60e81c6594da8298107a05b506f01797 (patch) | |
tree | a2eac6aee48ec09045b7a1f6457646588767ae52 /arch/x86/kernel/cpu/common.c | |
parent | deed05b7c017e49473e8c386efba196410fd18b3 (diff) |
x86: remove duplicated get_model_name() calling
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 286c89a991bd..a8b9b7242428 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -252,13 +252,13 @@ static struct cpu_dev __cpuinitdata default_cpu = { | |||
252 | .c_x86_vendor = X86_VENDOR_UNKNOWN, | 252 | .c_x86_vendor = X86_VENDOR_UNKNOWN, |
253 | }; | 253 | }; |
254 | 254 | ||
255 | int __cpuinit get_model_name(struct cpuinfo_x86 *c) | 255 | static void __cpuinit get_model_name(struct cpuinfo_x86 *c) |
256 | { | 256 | { |
257 | unsigned int *v; | 257 | unsigned int *v; |
258 | char *p, *q; | 258 | char *p, *q; |
259 | 259 | ||
260 | if (c->extended_cpuid_level < 0x80000004) | 260 | if (c->extended_cpuid_level < 0x80000004) |
261 | return 0; | 261 | return; |
262 | 262 | ||
263 | v = (unsigned int *) c->x86_model_id; | 263 | v = (unsigned int *) c->x86_model_id; |
264 | cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]); | 264 | cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]); |
@@ -277,8 +277,6 @@ int __cpuinit get_model_name(struct cpuinfo_x86 *c) | |||
277 | while (q <= &c->x86_model_id[48]) | 277 | while (q <= &c->x86_model_id[48]) |
278 | *q++ = '\0'; /* Zero-pad the rest */ | 278 | *q++ = '\0'; /* Zero-pad the rest */ |
279 | } | 279 | } |
280 | |||
281 | return 1; | ||
282 | } | 280 | } |
283 | 281 | ||
284 | void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) | 282 | void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c) |
@@ -610,8 +608,7 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c) | |||
610 | #endif | 608 | #endif |
611 | } | 609 | } |
612 | 610 | ||
613 | if (c->extended_cpuid_level >= 0x80000004) | 611 | get_model_name(c); /* Default name */ |
614 | get_model_name(c); /* Default name */ | ||
615 | 612 | ||
616 | init_scattered_cpuid_features(c); | 613 | init_scattered_cpuid_features(c); |
617 | detect_nopl(c); | 614 | detect_nopl(c); |