From: Yinghai Lu Date: Sat, 20 Sep 2008 01:41:16 +0000 (-0700) Subject: x86: cpu don't print duplicated vendor string X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bd32a8cfa8f172bd943655a3663d8005e5c1d83c;p=openwrt%2Fstaging%2Fblogic.git x86: cpu don't print duplicated vendor string Some CPUs have vendor string in the middle of model_id instead of beginning Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index fb789dd9e691..088fbdb6734e 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -797,7 +797,7 @@ void __cpuinit print_cpu_info(struct cpuinfo_x86 *c) 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])