From patchwork Tue Feb 21 18:07:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 60206 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp152016wrd; Tue, 21 Feb 2023 10:11:10 -0800 (PST) X-Google-Smtp-Source: AK7set+vHtYSMb8V982WztcQTIb7Mk7X9pGI7bEpLXqShCjbFZVgldAbsaol/dLTVRDTWPpC4g6N X-Received: by 2002:a17:902:ce8f:b0:19a:c9fc:b315 with SMTP id f15-20020a170902ce8f00b0019ac9fcb315mr9344616plg.30.1677003070177; Tue, 21 Feb 2023 10:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677003070; cv=none; d=google.com; s=arc-20160816; b=V86H2x7IbKJehwSbE81vSFS3MqLezxRcxXwVlSiol3tvwP6bnG8enXBC6LYAooFqy8 Fa7wnIjlyrYOQj/d0rmfRRE0u3iAv4dRgmiuVIfsd9B4oe+ec2/SWgMRcFDf1jBfqWPf omWY6pHR7+dlzacJjvQ1Y6w2Ec1m/qfm9lkMLGOr7ZxynV/2ANg94jqJhUw4woD3QNtA mpzBWHkFUBvjrchggRbXYEzrDPgNNpXAtW30BLSovsX46dYMtyaL9w/QQw1bu7rY2zfH nV+As0KHuOTqUGXurYMHH3NjHUNFrTMRks+e1UBRIfzbOPEm3/sEc6XNZom7PO6HRRYP FLMg== 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=FS5MMzUrtYY5N2w5QCadh2L/6Lyuv9jfcaqNKoRqTRU=; b=JtyJvVq7d6J7Zgjp4xUPp5a7InZDvlhKmXJegTtYq4sxU66Auq0pUKKoISM9X+ozKo fTAxwbBK8k+7Dr5KhnfNz0WBbHJJy55Ypb6+f8wjh7zHA7iNMdKPIg51e/k+v8rJ+sZe zi8d37V1+PGxhcBig9VUGKONj4UTqSBJ6DuEsPBlzsOHHG5d3GGGyczkQkc7utbBgVt6 8G+y5ZKs6kKvw1QXG9cCyA33R+LDBs0BdH0NSyObM5tgzykhxEoaEuHEjudgFnS5ymAw wMxBUYDbIfV3RbKDQLEM0QLZTi+6wQx64pWal3SlzP1IroryntQIwI/uoJhwX3qrgUBH CGXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Tp8eP0PU; 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 f20-20020a170902ab9400b0019c9999e8e7si1546248plr.279.2023.02.21.10.10.57; Tue, 21 Feb 2023 10:11: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=Tp8eP0PU; 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 S232900AbjBUSJu (ORCPT + 99 others); Tue, 21 Feb 2023 13:09:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232479AbjBUSI5 (ORCPT ); Tue, 21 Feb 2023 13:08:57 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D334530186 for ; Tue, 21 Feb 2023 10:08:13 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id l25so5012998wrb.3 for ; Tue, 21 Feb 2023 10:08:13 -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=FS5MMzUrtYY5N2w5QCadh2L/6Lyuv9jfcaqNKoRqTRU=; b=Tp8eP0PUoiVcM75LMYL8aaZZbsS7AeKgdfxwsUZrAvJX8kJ1lowfTamb4kvxSEf+OC iB0PF3Gj8urd+sZWlrpDP+jxK5eYX1FiS6nMy7OeuwpvIpPFCtwnBfq868njYeAUJELL kUV3d20eLe2U8n1x7q6bvPUb83Mxd9ozIsFLsYcJ0Ii779JMjncM0lK2xL9UIhjPhBhr rStCkRe5460M5VTyYeGLHaEY1FBFRs5ffrpi7kPJIN1POC4Pv7m5WK9JL05dMsxbRWyR BC7udu4t16lTiwT36ekj1WW4wIarX2yjYV3PKcaTti/qjQxNurT0U+5quYgrkjTPYRe5 UILQ== 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=FS5MMzUrtYY5N2w5QCadh2L/6Lyuv9jfcaqNKoRqTRU=; b=kk37BY63pHCTM5L/mUfYTwyvkgrgc+3afZfZw4hr2VcZLyi87v5LFhKJ7sg3bcJnS4 rRl9zbRxJzF4ts9AzxM5UuEa9uKyD/jrydVbCV7p2Ues48boMi6SQjg1kDYWmasaTZxp SLEZj3ps20V65bbjNebeGh2JEQ3QCW79WFxNu9jSKjuYBoTOncDkX6CZxthuGjlmApSE ynOZE5/OxIg3yff4Flh6FNV6BYZi6YlNWCv6DbZRA0kF407bDt6OiM3UN6ohTcdk+9cv 8rZL9qG+60bG00uQnakJWWHKVN5z/u12Sor3WO6dA+P0bjO8j2CBaSxJRybhQvzWNSfb KwdQ== X-Gm-Message-State: AO0yUKXOa3E1OXMigUibO1aDtPDpPZ92tXAFX1GuHIPyAh+0YL2UZbit N6LYFUxp9iC6rhGCftf0KjGWiA== X-Received: by 2002:adf:e4c5:0:b0:2c6:ca11:6c94 with SMTP id v5-20020adfe4c5000000b002c6ca116c94mr5101514wrm.60.1677002891504; Tue, 21 Feb 2023 10:08:11 -0800 (PST) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:1e9:315c:bb40:e382]) by smtp.gmail.com with ESMTPSA id c128-20020a1c3586000000b003e21558ee9dsm5107815wma.2.2023.02.21.10.08.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 10:08:11 -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 v2 15/16] thermal/drivers/acerhdf: Remove pointless governor test Date: Tue, 21 Feb 2023 19:07:09 +0100 Message-Id: <20230221180710.2781027-16-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230221180710.2781027-1-daniel.lezcano@linaro.org> References: <20230221180710.2781027-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?1758465171481139075?= X-GMAIL-MSGID: =?utf-8?q?1758465171481139075?= 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 Reviewed-by: Hans de Goede --- 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; }