From: Thomas Gleixner Date: Thu, 17 Nov 2016 18:35:26 +0000 (+0100) Subject: hwmon: (via-cputemp) Remove pointless CPU check on each CPU X-Git-Tag: v5.15~12297^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d7e0a24947c076a6cf6080c5f076c60ae8d9543;p=platform%2Fkernel%2Flinux-starfive.git hwmon: (via-cputemp) Remove pointless CPU check on each CPU The check loop for the cpu type is pointless as we already have a cpu model match before that. The only thing which is not covered by that check would be a smp system with two different cores. Not likely to happen. Cc: Jean Delvare Cc: Guenter Roeck Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c index ac91c07..5b9866b 100644 --- a/drivers/hwmon/via-cputemp.c +++ b/drivers/hwmon/via-cputemp.c @@ -319,22 +319,8 @@ static int __init via_cputemp_init(void) goto exit; cpu_notifier_register_begin(); - for_each_online_cpu(i) { - struct cpuinfo_x86 *c = &cpu_data(i); - - if (c->x86 != 6) - continue; - - if (c->x86_model < 0x0a) - continue; - - if (c->x86_model > 0x0f) { - pr_warn("Unknown CPU model 0x%x\n", c->x86_model); - continue; - } - + for_each_online_cpu(i) via_cputemp_device_add(i); - } #ifndef CONFIG_HOTPLUG_CPU if (list_empty(&pdev_list)) {