From patchwork Thu Nov 17 18:35:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 9435135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 47C4660469 for ; Thu, 17 Nov 2016 18:40:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B4862966B for ; Thu, 17 Nov 2016 18:40:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EA7029695; Thu, 17 Nov 2016 18:40:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1D472954C for ; Thu, 17 Nov 2016 18:40:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754876AbcKQSks (ORCPT ); Thu, 17 Nov 2016 13:40:48 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:49679 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754857AbcKQSgZ (ORCPT ); Thu, 17 Nov 2016 13:36:25 -0500 Received: from localhost ([127.0.0.1] helo=bazinga.breakpoint.cc) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1c7RVT-0005qn-EI; Thu, 17 Nov 2016 19:33:55 +0100 From: Sebastian Andrzej Siewior To: linux-kernel@vger.kernel.org Cc: rt@linuxtronix.de, Thomas Gleixner , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org, Sebastian Andrzej Siewior Subject: [PATCH 05/20] hwmon/via-cputemp: Remove pointless CPU check on each CPU Date: Thu, 17 Nov 2016 19:35:26 +0100 Message-Id: <20161117183541.8588-6-bigeasy@linutronix.de> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161117183541.8588-1-bigeasy@linutronix.de> References: <20161117183541.8588-1-bigeasy@linutronix.de> MIME-Version: 1.0 Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thomas Gleixner 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 Cc: linux-hwmon@vger.kernel.org Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior --- drivers/hwmon/via-cputemp.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c index ac91c07e3f90..5b9866b1b437 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)) {