Skip to contentSkip to conversation

x86: cpu don't print duplicated vendor string

PATCH Applied Yinghai Lu 2 participants 2 messages Sep 20, 2008 – Sep 22, 2008 x86

lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86: cpu don't print duplicated vendor string

Some CPUs have vendor string in the middle of model_id instead of beginning

---
 arch/x86/kernel/cpu/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/common.c +1 -1
Index: linux-2.6/arch/x86/kernel/cpu/common.c
===================================================================
@@ -797,7 +797,7 @@ void __cpuinit print_cpu_info(struct cpu
 	else if (c->cpuid_level >= 0)
 		vendor = c->x86_vendor_id;
 
-	if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
+	if (vendor && !strstr(c->x86_model_id, vendor))
 		printk(KERN_CONT "%s ", vendor);
 
 	if (c->x86_model_id[0])
Applied
#1 lore raw
Quoted 2 lines · Yinghai Lu

Some CPUs have vendor string in the middle of model_id instead of beginning

applied to tip/x86/core, thanks Yinghai.

Ingo