From patchwork Sun Feb 19 14:36:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 59179 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp881178wrn; Sun, 19 Feb 2023 06:59:10 -0800 (PST) X-Google-Smtp-Source: AK7set+yCdawHSIasWepQ7nQXKuOdOVONmP7Bvu5Yh2C0JWA2pUIrGic4koGzqAb8o+CVwbSOmNA X-Received: by 2002:a05:6402:5205:b0:4ac:d9e8:784d with SMTP id s5-20020a056402520500b004acd9e8784dmr3993981edd.19.1676818750459; Sun, 19 Feb 2023 06:59:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676818750; cv=none; d=google.com; s=arc-20160816; b=qaAhNItx4B6uWwVC7tSQ5VFwXWMudi+cWrHJAOBs6UpFydvJxoIErQBRttg5af11/J +iOaElKeOB9+L+BQB4D8zzVX4907iuxWwgo6IUvkYBWhW21lWs1eKLOdLU4zh/m9qXoC E4tTrHn7hF/FfKcA9ObYpb8FTTQs6diry0S1QDALpN/3iUws/mdYfpN95ltj9Q6ruImK IN7CJ4lYkSGaLW3QVpmjrpU8Q4D2dUu7kGmjiz/KUWM9uiQEDYfYvDwjOTUcHzRPnKs+ bGnRhFkC99r0ziCcXXQQaas+VljSbbyCNTTc58BCtsdgOPKE7zo3NCwKNh3Q8woAr4S/ ++9w== 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=6cznqdx01/faUtAoqSoejbDua4FcHXQ+/pRuK304PkQ=; b=u6FGyEOzp8okPDSzPRuaVBIb/TOZuBHPm5dPR3rcYFZE7LZw6rnDZwU1yHKPEcp2Zs 3QlLKZRnCQpb/txdq3MFkWD9y+dJCUeUjRRY7sW2SyXkwhtuY7r3BdJgj5tOJJivYBjC i6Y/VGCTrA3IAWCeW3IjoI6BZX15I2N++sbsDlQsSFxyySCcJRLOLGERKCKvJJywwguN 07CcYJ1uveYn4XinNB2Ox7gS4p94/QLQcY57/QzvIKM5RV+iDmickdIEbaRscGECqgjD dTkdIr2FFlqvop+Zog+knQ9PXFZsPuA9B/TNA9EQ4cDtRc5QYU8I0OPoju3MNdy+cclD jcgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cBxhQu1M; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c20-20020aa7df14000000b004ad72247823si10220640edy.176.2023.02.19.06.58.47; Sun, 19 Feb 2023 06:59:10 -0800 (PST) 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=@linaro.org header.s=google header.b=cBxhQu1M; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbjBSOjj (ORCPT + 99 others); Sun, 19 Feb 2023 09:39:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbjBSOik (ORCPT ); Sun, 19 Feb 2023 09:38:40 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C9BD4C1C for ; Sun, 19 Feb 2023 06:38:19 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id g7so387411wrd.3 for ; Sun, 19 Feb 2023 06:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6cznqdx01/faUtAoqSoejbDua4FcHXQ+/pRuK304PkQ=; b=cBxhQu1MiOuL3c2L69272RQU7uQ6pCjBn1d6SnryOcPwzupn7ueF8v5MEdeVNvBhYS h4/TwVhfcN/MN9hlwB8QyTpNx+kdobugSn0/OhyFNEDgT7L7qRjm7Cd4yrhANU2OyGFV H1Qr5jUOIf0mZbTCAggAc4iJl9V8emZbfsBOze00UrhXGJ08aOO5AGUd+PT7QEfvz79i gjL7hSex7iEmPfKugolaqZ8XvolQH32Po+izM+zymyRhbarpF73Z//ViWIr/peUf/x9o JmHUGmsJT3ZvAFbajR3+xKxLS2GpaGjNTHYlrrha9gLDylB2mlXJOMZaHZIIyaTczr82 jyAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6cznqdx01/faUtAoqSoejbDua4FcHXQ+/pRuK304PkQ=; b=Mjhay5pw0cU87svCi1HAHGpRNXy0iu1fgL8BFvvq1KYBuW6NCp7lfTVG9zoVpi009T 7ihiN6JVuakcc58pJOdAZDvXNfyVfGn7U7x+QdbaVBKlW8zHoDYwxvZFDGYf5HaX0NDA Xc3uAb9tR80S7tOOLUmcL0IJRQ2ffgepUg/gvpxc7mkdOI5m0JasauWWwQVuHrg5/oaM u9qhJrQXv3X8s+gE7KnBem1zE6vaLXh1JqfS0vCSttm+G6Yu5LXycYo3q6kLPC+Jr6tD XFYBqPNHDDTCAwNeJGZGtnLI7Qvx5FwR9ApoB/8XuKltGF29txgvVOH+qjgZVUc6eaSw Xk2A== X-Gm-Message-State: AO0yUKUbGTX0xmNFV5fYmVkB2cqEOq6Sde59+sFAWcViE/KHgK/ecQyS +V7ucP8WO+kGtBwe6qBeDbs9aw== X-Received: by 2002:a05:6000:1866:b0:2c4:669:fda4 with SMTP id d6-20020a056000186600b002c40669fda4mr642159wri.0.1676817497552; Sun, 19 Feb 2023 06:38:17 -0800 (PST) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:6f43:b92:7670:463]) by smtp.gmail.com with ESMTPSA id a18-20020adfe5d2000000b002be505ab59asm86176wrn.97.2023.02.19.06.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 06:38:17 -0800 (PST) From: Daniel Lezcano To: rafael@kernel.org, daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Kaestle , Hans de Goede , Mark Gross , platform-driver-x86@vger.kernel.org (open list:ACER ASPIRE ONE TEMPERATURE AND FAN DRIVER) Subject: [PATCH v1 16/17] thermal/drivers/acerhdf: Remove pointless governor test Date: Sun, 19 Feb 2023 15:36:56 +0100 Message-Id: <20230219143657.241542-17-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230219143657.241542-1-daniel.lezcano@linaro.org> References: <20230219143657.241542-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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?1758271897859470097?= X-GMAIL-MSGID: =?utf-8?q?1758271897859470097?= The thermal zone parameter specifies the bang-bang governor. The Kconfig selects the bang-bang governor. So it is pointless to test if the governor was set for the thermal zone assuming it may not have been compiled-in. Remove the test and prevent another access into the thermal internals. Signed-off-by: Daniel Lezcano Acked-by: Peter Kaestle --- drivers/platform/x86/acerhdf.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c index 61f1c3090867..71b9c1f922d9 100644 --- a/drivers/platform/x86/acerhdf.c +++ b/drivers/platform/x86/acerhdf.c @@ -697,13 +697,6 @@ static int __init acerhdf_register_thermal(void) if (ret) return ret; - if (strcmp(thz_dev->governor->name, - acerhdf_zone_params.governor_name)) { - pr_err("Didn't get thermal governor %s, perhaps not compiled into thermal subsystem.\n", - acerhdf_zone_params.governor_name); - return -EINVAL; - } - return 0; }