Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86339C6379F for ; Sun, 19 Feb 2023 22:14:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231494AbjBSWOL convert rfc822-to-8bit (ORCPT ); Sun, 19 Feb 2023 17:14:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231470AbjBSWOJ (ORCPT ); Sun, 19 Feb 2023 17:14:09 -0500 Received: from smtprelay05.ispgateway.de (smtprelay05.ispgateway.de [80.67.31.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A1EF166E9; Sun, 19 Feb 2023 14:14:08 -0800 (PST) Received: from [80.82.223.85] (helo=mail.piie.net) by smtprelay05.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1pTrLJ-0008LS-Oh; Sun, 19 Feb 2023 22:35:33 +0100 MIME-Version: 1.0 Date: Sun, 19 Feb 2023 21:35:33 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT X-Mailer: RainLoop/1.16.0 From: "=?utf-8?B?UGV0ZXIgS8Okc3RsZQ==?=" Message-ID: <08478e74cab0a5621fbcd4e0f0a97ccb@piie.net> Subject: Re: [PATCH v1 16/17] thermal/drivers/acerhdf: Remove pointless governor test To: "Daniel Lezcano" , rafael@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, "Hans de Goede" , "Mark Gross" , platform-driver-x86@vger.kernel.org In-Reply-To: <20230219143657.241542-17-daniel.lezcano@linaro.org> References: <20230219143657.241542-17-daniel.lezcano@linaro.org> <20230219143657.241542-1-daniel.lezcano@linaro.org> X-Df-Sender: cGV0ZXJAcGlpZS5uZXQ= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 19. Februar 2023 15:38, "Daniel Lezcano" schrieb: > 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; > } > > -- > 2.34.1