* [PATCH] platform/x86: think-lmi: Properly interpret return value of tlmi_setting
@ 2023-03-12 3:47 Thomas Weißschuh
2023-03-16 14:44 ` Hans de Goede
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Weißschuh @ 2023-03-12 3:47 UTC (permalink / raw)
To: Mark Pearson, Hans de Goede, Mark Gross
Cc: platform-driver-x86, linux-kernel, Thomas Weißschuh
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(-)
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,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Properly interpret return value of tlmi_setting
2023-03-12 3:47 [PATCH] platform/x86: think-lmi: Properly interpret return value of tlmi_setting Thomas Weißschuh
@ 2023-03-16 14:44 ` Hans de Goede
2023-03-17 13:33 ` Mark Pearson
0 siblings, 1 reply; 3+ messages in thread
From: Hans de Goede @ 2023-03-16 14:44 UTC (permalink / raw)
To: Thomas Weißschuh, Mark Pearson, Mark Gross
Cc: platform-driver-x86, linux-kernel
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] platform/x86: think-lmi: Properly interpret return value of tlmi_setting
2023-03-16 14:44 ` Hans de Goede
@ 2023-03-17 13:33 ` Mark Pearson
0 siblings, 0 replies; 3+ messages in thread
From: Mark Pearson @ 2023-03-17 13:33 UTC (permalink / raw)
To: Hans de Goede, Thomas Weißschuh, Mark Pearson, markgross
Cc: platform-driver-x86, linux-kernel
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-17 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-12 3:47 [PATCH] platform/x86: think-lmi: Properly interpret return value of tlmi_setting Thomas Weißschuh
2023-03-16 14:44 ` Hans de Goede
2023-03-17 13:33 ` Mark Pearson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.