Message ID | 20230312-think-lmi-status-v1-1-4e9f36322cc4@weissschuh.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp561372wrd; Sat, 11 Mar 2023 19:53:05 -0800 (PST) X-Google-Smtp-Source: AK7set+kAH/OTL7zNH5/dz5J79vxvTHkDwtk4l2SC711HUK4T2krdv4j/bKyGuoHyo/p+uk2qvc9 X-Received: by 2002:a17:902:a512:b0:19d:1474:2ba4 with SMTP id s18-20020a170902a51200b0019d14742ba4mr25467324plq.32.1678593185001; Sat, 11 Mar 2023 19:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678593184; cv=none; d=google.com; s=arc-20160816; b=d1fS6bcEqFfKMyib92dozsvS+9jaEeAAOyXhyHuIc0A4sc7DSkSHxEPnsR34mpcTpU SmfRj57j99JGAWkaGYu03Qn4tQE5pX3k7K5h1iIdHRQ3pzdHVfol9r9NighvOooXMd5a ZQwvECKWazaN8TubhIf0daEpqV8ebptxMAOoq/r8jk0Opw1KwbSyTclXw2j+tvDQmaPq 5/RIzFdPN37khxVO7zmskqBgsz0KZXXM/LKLEY2aXV6thiLwput08bMsPIjF7IdbGhOW PEmuEpaDEFo/pMFtqIaN+Wnc8YKn6pqb4g/wWzPY304W5zkZCFr7VtTRFFJC/E1xV0q+ Me+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:dkim-signature:from; bh=kiv54i5jAIoET7Dyd2cMzgC1VbX/qIXhVCkniRv5UL8=; b=Ro0sjWob8OTr/IrY4YX8aL2S482uG/rsNzS+h+Zirtu3jIsQeF2fQ1GqRwnhhXjggN IJY1+DPfa3jA1ECeMEB5MWU1PGVa9aijLMw/1NIBAfT9t9XufrB0AoeObGAI4VDXPMsb Cw4QGv5T+9y9S15HhcISz+SftfhlQ00VzppWRMKmGGURULjRR2oeJy6ZMSGv1UYLz3gV 5PDPObnnu80zGss3LFe/7iUjvcBQaQFPQ6iPNGtoOEZqIY/RMnyiHoLZecxA4sBeNgZi k7i8PMorcIuODfiMIwddNfLSCoFj48FDaNao8QrBQfmTVuLGwHnyUC+nK4Emp1uNo0Yb n7nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=KU+g7t96; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id az3-20020a170902a58300b001870c4d4378si75826plb.498.2023.03.11.19.52.50; Sat, 11 Mar 2023 19:53:04 -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=@weissschuh.net header.s=mail header.b=KU+g7t96; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbjCLDsx (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Sat, 11 Mar 2023 22:48:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjCLDsv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 11 Mar 2023 22:48:51 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F065301B0; Sat, 11 Mar 2023 19:48:49 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1678592927; bh=+rMHRDkeP4GJtkRDL8MbsK85+v58lq+Nd+xJTUAGoUU=; h=From:Date:Subject:To:Cc:From; b=KU+g7t96YIFS7B2isCvvNWrFXjBfgKGm1fVErAV8xjj1k8NJ2xSJmkIBnPhzJuqli xVRlXJCDKtyUfcrK2Eila0HHZ/oljLb78c3GUfvSzpUGcdG08b2jYmiOB7JkrRg0na TI0am49Kx7ryRE7f453xyvPfecgwozLk+zZjsAjQ= Date: Sun, 12 Mar 2023 03:47:57 +0000 Subject: [PATCH] platform/x86: think-lmi: Properly interpret return value of tlmi_setting MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230312-think-lmi-status-v1-1-4e9f36322cc4@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAGxLDWQC/x2NywoCMQwAf2XJ2UDbBRf9FfHQR7TBGqXpirDsv xs8zsAwGyh1JoXztEGnDyu/xMAfJsg1yp2QizEEF2Y3+4CjsjywPRl1xLEqurIccyKflnICy1J UwtSj5GqhrK2ZfHe68ff/uVz3/QfB3gYJdwAAAA== To: Mark Pearson <markpearson@lenovo.com>, Hans de Goede <hdegoede@redhat.com>, Mark Gross <markgross@kernel.org> Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678592925; l=1193; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=+rMHRDkeP4GJtkRDL8MbsK85+v58lq+Nd+xJTUAGoUU=; b=qT5CKb7vhit8yR26drfrCP1cnWOS9WR8fzTCo52CJMP0ndSGSZnKum5T+CfijDiWZMhnIs0YQ T2Sc6W8/jSRAeW99fLmoL0w4w/usuXyf/iHPXaFZzcZwszbdv/Q+nCU X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760132527792462831?= X-GMAIL-MSGID: =?utf-8?q?1760132527792462831?= |
Series |
platform/x86: think-lmi: Properly interpret return value of tlmi_setting
|
|
Commit Message
Thomas Weißschuh
March 12, 2023, 3:47 a.m. UTC
The return value of tlmi_settings() is an errorcode, not an acpi_status.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Note: This is only compile-tested.
---
drivers/platform/x86/think-lmi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
base-commit: 81ff855485a366a391dc3aed3942715e676ed132
change-id: 20230312-think-lmi-status-0d76cbe1b7d9
Best regards,
Comments
Hi, On 3/12/23 04:47, Thomas Weißschuh wrote: > The return value of tlmi_settings() is an errorcode, not an acpi_status. > > Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans > --- > > Note: This is only compile-tested. > --- > drivers/platform/x86/think-lmi.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c > index 86b33b74519b..c924e9e4a6a5 100644 > --- a/drivers/platform/x86/think-lmi.c > +++ b/drivers/platform/x86/think-lmi.c > @@ -1353,7 +1353,6 @@ static struct tlmi_pwd_setting *tlmi_create_auth(const char *pwd_type, > > static int tlmi_analyze(void) > { > - acpi_status status; > int i, ret; > > if (wmi_has_guid(LENOVO_SET_BIOS_SETTINGS_GUID) && > @@ -1390,8 +1389,8 @@ static int tlmi_analyze(void) > char *p; > > tlmi_priv.setting[i] = NULL; > - status = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID); > - if (ACPI_FAILURE(status)) > + ret = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID); > + if (ret) > break; > if (!item) > break; > > --- > base-commit: 81ff855485a366a391dc3aed3942715e676ed132 > change-id: 20230312-think-lmi-status-0d76cbe1b7d9 > > Best regards,
Tested on a couple of my platforms - all looked good. Tested-by: mpearson-lenovo@squebb.ca Mark On Thu, Mar 16, 2023, at 10:44 AM, Hans de Goede wrote: > Hi, > > On 3/12/23 04:47, Thomas Weißschuh wrote: >> The return value of tlmi_settings() is an errorcode, not an acpi_status. >> >> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> > > Thank you for your patch, I've applied this patch to my review-hans > branch: > https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans > > Note it will show up in my review-hans branch once I've pushed my > local branch there, which might take a while. > > Once I've run some tests on this branch the patches there will be > added to the platform-drivers-x86/for-next branch and eventually > will be included in the pdx86 pull-request to Linus for the next > merge-window. > > Regards, > > Hans > > >> --- >> >> Note: This is only compile-tested. >> --- >> drivers/platform/x86/think-lmi.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c >> index 86b33b74519b..c924e9e4a6a5 100644 >> --- a/drivers/platform/x86/think-lmi.c >> +++ b/drivers/platform/x86/think-lmi.c >> @@ -1353,7 +1353,6 @@ static struct tlmi_pwd_setting *tlmi_create_auth(const char *pwd_type, >> >> static int tlmi_analyze(void) >> { >> - acpi_status status; >> int i, ret; >> >> if (wmi_has_guid(LENOVO_SET_BIOS_SETTINGS_GUID) && >> @@ -1390,8 +1389,8 @@ static int tlmi_analyze(void) >> char *p; >> >> tlmi_priv.setting[i] = NULL; >> - status = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID); >> - if (ACPI_FAILURE(status)) >> + ret = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID); >> + if (ret) >> break; >> if (!item) >> break; >> >> --- >> base-commit: 81ff855485a366a391dc3aed3942715e676ed132 >> change-id: 20230312-think-lmi-status-0d76cbe1b7d9 >> >> Best regards,
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 86b33b74519b..c924e9e4a6a5 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -1353,7 +1353,6 @@ static struct tlmi_pwd_setting *tlmi_create_auth(const char *pwd_type, static int tlmi_analyze(void) { - acpi_status status; int i, ret; if (wmi_has_guid(LENOVO_SET_BIOS_SETTINGS_GUID) && @@ -1390,8 +1389,8 @@ static int tlmi_analyze(void) char *p; tlmi_priv.setting[i] = NULL; - status = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID); - if (ACPI_FAILURE(status)) + ret = tlmi_setting(i, &item, LENOVO_BIOS_SETTING_GUID); + if (ret) break; if (!item) break;