From patchwork Thu Mar 30 10:33:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 77049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1027398vqo; Thu, 30 Mar 2023 03:38:49 -0700 (PDT) X-Google-Smtp-Source: AKy350ZcV37p3MG7Lx4G0Qzjgsv2MQe0OggXG8KZyoUWSGVVUFKaby1eBjuMqYDWjOfQifY1IR9V X-Received: by 2002:a05:6402:202:b0:4fb:59bb:ce6f with SMTP id t2-20020a056402020200b004fb59bbce6fmr23723189edv.35.1680172729255; Thu, 30 Mar 2023 03:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680172729; cv=none; d=google.com; s=arc-20160816; b=S5i1G/BbQ0bRtVGLBytvVJXTBnxObBDbg1AR83F61Lae2lBDLPg4HPN1jU1ktisvIk MnRPat6CZI5FRse+mX6zyY1T87GY4us9QNu1tzL/fCl//9W0b0i15Dd48iDk9mviSAZX eTDddgY08dfuEtzbAOB7ZYWmLEBM8DS84FV5P/a8rw7RObEB6RULL2owRDUvAI/5YNyf lzvtK3dGVa3jAx4enUSYL6uyLnz3rwzYlhqHMBDvoJhOXAUWZzP2rTVubsvLCOyFo2aq 6V8IOdDfEDrXwYZGDAW4xxlc6Og6Hdx6Wjsluw/HSQA5Cj7vJXmU60Kd8I58DLp+xOYY 1P0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=AzDKmaD4+IsWgxKxnHxYBt5dEYkX2Oo78DCUoPgWAzY=; b=UYT/rk9NC1q1oTgJFZVommTAQeZVlrbX4klhehhl1fr2Syd3B+3kTQHxmSR52afndf SBDcCmzlkVXsPooxapKnIXkfPo4ZpaD8ePCdPSR7/nBAC9jkRocWevAY/58s1BRB85np qnUYyYm9X2+h8aOmzf9SI+VbDUslmPLxAqSCiTAlU5EKTVo1NR8eUan1DwOsWkXC1dPF PRXs7lP2rrfhvFuujMvWul/9zKuMmDwgDbfEjlso+majSosb5Tx8RYfRARCdQOYspB/b /TVvuL2rMobgHRz+w7ydBREkWtb6VhJknY1CypytFEiV90PtcdHReREqcIlLSVKmDaBT 93lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XdaD6IyJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx11-20020a170907760b00b008b17ae97330si33495412ejc.880.2023.03.30.03.38.24; Thu, 30 Mar 2023 03:38:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XdaD6IyJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229862AbjC3KeS (ORCPT + 99 others); Thu, 30 Mar 2023 06:34:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230348AbjC3KeL (ORCPT ); Thu, 30 Mar 2023 06:34:11 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EDC240C8; Thu, 30 Mar 2023 03:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680172450; x=1711708450; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=aMBrQv3dD6HKKF5OK2mlzf/ElkqwSIasmpXMMURYf7c=; b=XdaD6IyJYXzHf1keZCkTAxzHr5vJSXNY/ftsJwBoRxBZYJ1pb7wwTZVs cthrIpjn9NNRPiplZkeuPKbKehjO2TaMOvs+sStHhQAPiRCyU0dQrTBu1 /Vca6AihNsKm1amdW6ENjJdeA8HBl4ANJ6VkBbnpKwPfgcCqVX4ryQi7G vDq3Bof9mEBDKN8aDr1WtM0IC2ca6jdfC+GkLjK/EDrF4Ua+gI76UVCZx HW3Q7DIYtgpXLZrfPLsuCquZlYMHlVmFTSYbFy4buNgLkrtaH7t3obNVY IE6iDF1IKkabLLHdgSQbNuGxcgW2bpL5k1NcqGGBsR84VTL1aTKwYtU6E A==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="368910788" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="368910788" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 03:34:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="634832281" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="634832281" Received: from junjiech-mobl.ccr.corp.intel.com (HELO rzhang1-DESK.intel.com) ([10.254.213.63]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 03:34:08 -0700 From: Zhang Rui To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, peter.ganzhorn@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] hwmon: (coretemp) Delete tjmax debug message Date: Thu, 30 Mar 2023 18:33:45 +0800 Message-Id: <20230330103346.6044-1-rui.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761788799629567252?= X-GMAIL-MSGID: =?utf-8?q?1761788799629567252?= After commit c0c67f8761ce ("hwmon: (coretemp) Add support for dynamic tjmax"), tjmax value is retrieved from MSR every time the temperature is read. This means that, with debug message enabled, the tjmax debug message is printed out for every single temperature read for any CPU. This spams the syslog. Ideally, as tjmax is package scope unique, the debug message should show once when tjmax is changed for one package. But this requires inventing some new per-package data in the coretemp driver, and this is overkill. To keep the code simple, delete the tjmax debug message. Signed-off-by: Zhang Rui --- drivers/hwmon/coretemp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 30d77f451937..fe3d4d0dcbed 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -286,10 +286,8 @@ static int get_tjmax(struct temp_data *tdata, struct device *dev) * If the TjMax is not plausible, an assumption * will be used */ - if (val) { - dev_dbg(dev, "TjMax is %d degrees C\n", val); + if (val) return val * 1000; - } } if (force_tjmax) { From patchwork Thu Mar 30 10:33:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 77044 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1026313vqo; Thu, 30 Mar 2023 03:36:18 -0700 (PDT) X-Google-Smtp-Source: AKy350YiLKoUcZMDxZQPegvzAe3L1ziwhVu5SnxfX2Bp/R9r1dxTuhViM7M38NJFfdOQgAz1R1FN X-Received: by 2002:a17:902:ce8a:b0:1a1:a8eb:d34d with SMTP id f10-20020a170902ce8a00b001a1a8ebd34dmr27177681plg.46.1680172578125; Thu, 30 Mar 2023 03:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680172578; cv=none; d=google.com; s=arc-20160816; b=OUgigaPDJvSxqFqrkPM0MZcL5YBehdblrO/rqxO73R62MjaMmbNOqq6jKNT6leKgfL 5KJQKqfnyd4ozlcLXtQdIHqy8yjXrzbqZhVuap9rktiJNRMwQpa+fIFjnzHcXUxv7M6e zoqNG9NUa6kSL28HfOGxAdBiULU9raP5AafDDor/sGK8feQAvM88+5qkSmYmqVQL7fJ0 cppAYQvF486QPgsgNoqKJg9F+B9DgQqoNdKzRikyura3Xrq5aykLQM72N5qnjFi4Ooes 2Ql0qBIknlTzzhk2OoiVQbgrLZwACdlzEUQqJ0z5P2ZmPB45DcCiLmAhlHKNorW9N2+/ traA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9rQ6MO8VtuSh+s84WFn1w85otiGBuDsiYhUWxYsYeEs=; b=En636AcHi4vtvis3yiCOVT19U3YTqC78B0bCzV7yeIi4xPp325BCFyTCCa4+7MBGTI CTL27v4hsSF6aZfUU14EpDNvbsMqhBiYrM7DHA3qhZDCZkkpJ56IIs+wf+QElgtALazk aWBozFJVcdhy5izB4sCvajcmaPGZYVHrNsPgfqJMezDEvBfJZy0Evykc//Mcz7mM8Fcb nygbIjU2nqgbLuMDZ/1goF5Sx5Rz9IoVf5h4qiYQ7siR92olaWv5GkHsZrhX0KXYbGNV HWrbQRWi8nj+ycg0XICxhhsBcT2lUah+0GZsVYMkTnUpGtvR9Sdzj75nWX7ljGd4x3Z+ mcGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k3heUWsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a631142000000b0050be5b718ebsi33049188pgr.272.2023.03.30.03.36.04; Thu, 30 Mar 2023 03:36:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=k3heUWsE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbjC3KeU (ORCPT + 99 others); Thu, 30 Mar 2023 06:34:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230397AbjC3KeM (ORCPT ); Thu, 30 Mar 2023 06:34:12 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB29661B8; Thu, 30 Mar 2023 03:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680172451; x=1711708451; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=whE1JWEEIbCYvxtx8pgmTqwGvrhSLFpbgGUYD65V//Q=; b=k3heUWsEIVlShvxiwZrU36to/WTqMen83G9hwqTTEfr1ON6lYYDGtbYo lxph9q8Awx9UNc3CT3Mcwp12WO0BGayHhn6w9wSp1Bx1Sj1kYHz3IUTgq 5TJxSZpLt2Tqn5DEs6O8nkyks/DHNOZKErTGjTVjDxA9de0FixR3AGTvN uWdSYX/KsRadGDsjZeBMLRkyoaRiygaudFRTKHeGBBiZZsWOG6o/dJw1O svRgHpJEOHCJ60zX9sgAqa597Cpa7/AbQ0Y+qWvWDLBzwglocN97t8cxS phNXtWmXHbbVrRxEZr9N72MiojIv3ejqn7oJiME+fgOAmz8sOe9IbMtaP w==; X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="368910798" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="368910798" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 03:34:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10664"; a="634832283" X-IronPort-AV: E=Sophos;i="5.98,303,1673942400"; d="scan'208";a="634832283" Received: from junjiech-mobl.ccr.corp.intel.com (HELO rzhang1-DESK.intel.com) ([10.254.213.63]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2023 03:34:10 -0700 From: Zhang Rui To: jdelvare@suse.com, linux@roeck-us.net Cc: linux-hwmon@vger.kernel.org, peter.ganzhorn@gmail.com, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] hwmon: (coretemp) Delete an obsolete comment Date: Thu, 30 Mar 2023 18:33:46 +0800 Message-Id: <20230330103346.6044-2-rui.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230330103346.6044-1-rui.zhang@intel.com> References: <20230330103346.6044-1-rui.zhang@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761788641356250374?= X-GMAIL-MSGID: =?utf-8?q?1761788641356250374?= The refinement of tjmax value retrieved from MSR_IA32_TEMPERATURE_TARGET has been changed for several times. Now, the raw value from MSR is used without refinement. Thus remove the obsolete comment. Signed-off-by: Zhang Rui --- drivers/hwmon/coretemp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index fe3d4d0dcbed..eba94f68585a 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -282,10 +282,6 @@ static int get_tjmax(struct temp_data *tdata, struct device *dev) dev_warn(dev, "Unable to read TjMax from CPU %u\n", tdata->cpu); } else { val = (eax >> 16) & 0xff; - /* - * If the TjMax is not plausible, an assumption - * will be used - */ if (val) return val * 1000; }