Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2258453rdb; Fri, 8 Dec 2023 03:06:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IESdFfE/qiiWUGjJuBV7CXpubo7Jx2oAynWbUqZ42zJqG2SqqKt24RpGtE5sbDP4LfkfKaE X-Received: by 2002:a05:6a20:9192:b0:18b:960a:efc2 with SMTP id v18-20020a056a20919200b0018b960aefc2mr3793045pzd.10.1702033606879; Fri, 08 Dec 2023 03:06:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702033606; cv=none; d=google.com; s=arc-20160816; b=aZ/Me9ejiJfOAnpJZNNVLfJl6uOGqyAH1g0RMUBxvAgc3MGX1LD7RR+P6NrjcT7Yhe YDf4HfV47KbdQaaDLo1ZZh4DCjOGQTEi7NRO0YbLMFd5eWmkueogeNVAXiFlqpGizQxW Otu8qE42BUqd9UjolLzu1/0fmf8FHwViFHYdw+L9pRwfvrFz3ejzi54HW/JQSScjvJEa q86KckHcEOK9/wPN2arScDizmLr5JawO5z3uzquho92JVubmQDx47KbS51QG20qQmEnp 7C9l/ZXLEgVjtn0W30yQ7l03IGkOxnWuwxtQWkiE0DmHP8vQ4rxwCpRhOJzCwzVTGjgq SNwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=W1+Hgg5IEBwkFVs6DigKWPX8f4qLti/RmWrPFFbo3KY=; fh=SmYrJWR8Rm62va/8HRvcHlJROgr/jwR1oEEBIcOsKno=; b=qU5kaNpWSd2xSHriDLPhHvQL7yCmek+KZW4ArzmdN7Y21brqvoQOB8cIeQeyFe4io3 SdVzuMGbKtTZaTshFykb7HyvlXpeOQo25qj4PYXQmdZr91MxpVyLqTHMs9SBrRwCfMVB urK5cV134BjbDwwlAuFL8R5uR+d17BOL4JorL4pj7WEqBWlPllCn0UoBwdXT4t52NRQC 238Qqr33Dk9R0gNK7+41NsLzQ3auGhQVKvGPUTdeINg4B7fKjTkqYJwLB8ws2FveCRbv ogMMh2pda4P5d8NjR1inmA29skJQ4ix0DCDs7Txmn4IOvV9pvy2iTFkZn1sSfSXMiHsY +yYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mFAmQkqK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id ko19-20020a056a00461300b006ce83264887si1430322pfb.57.2023.12.08.03.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 03:06:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mFAmQkqK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 039C38246303; Fri, 8 Dec 2023 03:06:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573739AbjLHLGT (ORCPT + 99 others); Fri, 8 Dec 2023 06:06:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573702AbjLHLGQ (ORCPT ); Fri, 8 Dec 2023 06:06:16 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F9471732; Fri, 8 Dec 2023 03:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702033583; x=1733569583; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=Lut/IjYzOv9srBYiYEXBVWgNLBYWSH+5N7YUlD28cxc=; b=mFAmQkqKPLCTFHur5PtlFRwBLZlUcDWL1v3pkIDkR0EgbP2ZQWeo0vTp TAPPQ7YxJEWHmmNYb4ZkIs+4e7Xv2F3IbIJQlsbtoWiLYEt7W013aERfH K9IeD+X6NkYUEH4IQQfFKum2dyZFiE5OMga2BB+gI9x31MxwVNI0lt3XE tS4iufHJtmBn55CZ4+sgSS5BlJnCBUHkfHXTSI/qyerLJI+/pmZl4OxjD mmOcQvS4zG8jzm2Kb1o2+rIJKF3v05QlWZJSJ/8c72DG3uk1ddt1hoOP+ WkXgSybHxWxTtBJd4O4opXOXRBUzB+RWGVOW4H5eWXdEUZCQ9D68Jpy9S Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="1456041" X-IronPort-AV: E=Sophos;i="6.04,260,1695711600"; d="scan'208";a="1456041" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2023 03:06:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10917"; a="1103534402" X-IronPort-AV: E=Sophos;i="6.04,260,1695711600"; d="scan'208";a="1103534402" Received: from smatua-mobl.ger.corp.intel.com ([10.251.223.110]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2023 03:06:19 -0800 Date: Fri, 8 Dec 2023 13:06:17 +0200 (EET) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Vishnu Sankar cc: Hans de Goede , Mark Pearson , platform-driver-x86@vger.kernel.org, LKML , markgross@kernel.org Subject: Re: [PATCH] platform/x86: thinkpad_acpi: fix for incorrect fan reporting on some ThinkPad systems In-Reply-To: <2ae27a1b-a472-8a57-994e-f016cc25dafc@linux.intel.com> Message-ID: <25f86da-2484-3cf9-ae1e-73cac2e6541a@linux.intel.com> References: <20231206162003.92010-1-vishnuocv@gmail.com> <2ae27a1b-a472-8a57-994e-f016cc25dafc@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-4976533-1702033581=:1875" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 08 Dec 2023 03:06:44 -0800 (PST) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-4976533-1702033581=:1875 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8BIT On Fri, 8 Dec 2023, Ilpo J?rvinen wrote: > On Thu, 7 Dec 2023, Vishnu Sankar wrote: > > Hi Vishnu, > > Thanks for the patch. > > > Some ThinkPad systems ECFW use non-standard addresses for fan control > > and reporting. This patch adds support for such ECFW so that it can report > > the correct fan values. > > Tested on Thinkpads L13 Yoga Gen 2 and X13 Yoga Gen 2. > > > > Co-developed-by: Mark Pearson > > Signed-off-by: Vishnu Sankar > > + /* Default mode is AUTO which means controlled by EC */ > > + if (unlikely(!acpi_ec_read(fan_status_offset_ns, &s))) > > I'm skeptical that all these unlikely/likely() are useful. Some might even > be harmful if e.g. is some error condition keeps repeating itself and > the particular if handling that is marked with unlikely(). > > I know the code in that file is littered with them already but it would > be better to add into that, IMO. So I'm missing the negative here, I meant: ... not add into that ... -- i. --8323329-4976533-1702033581=:1875--