From: Hans de Goede <hdegoede@redhat.com>
To: Armin Wolf <W_Armin@gmx.de>, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] platform/x86: wmi: Avoid returning AE_OK upon unknown error
Date: Tue, 5 Mar 2024 10:08:22 +0100 [thread overview]
Message-ID: <175fcdf2-255c-4cfe-9e5d-d349accb88d1@redhat.com> (raw)
In-Reply-To: <20240304221732.39272-2-W_Armin@gmx.de>
Hi,
On 3/4/24 23:17, Armin Wolf wrote:
> If an error code other than EINVAL, ENODEV or ETIME is returned
> by ec_read()/ec_write(), then AE_OK is wrongly returned.
>
> Fix this by only returning AE_OK if the return code is 0, and
> return AE_ERROR otherwise.
>
> Tested on a Dell Inspiron 3505 and a Asus Prime B650-Plus.
>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/platform/x86/wmi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 900e0e52a5fa..be0e772a87c8 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -1213,8 +1213,10 @@ acpi_wmi_ec_space_handler(u32 function, acpi_physical_address address,
> return AE_NOT_FOUND;
> case -ETIME:
> return AE_TIME;
> - default:
> + case 0:
> return AE_OK;
> + default:
> + return AE_ERROR;
> }
> }
>
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-03-05 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 22:17 [PATCH 1/2] platform/x86: wmi: Support reading/writing 16 bit EC values Armin Wolf
2024-03-04 22:17 ` [PATCH 2/2] platform/x86: wmi: Avoid returning AE_OK upon unknown error Armin Wolf
2024-03-05 9:08 ` Hans de Goede [this message]
2024-03-06 10:20 ` Ilpo Järvinen
2024-03-05 9:08 ` [PATCH 1/2] platform/x86: wmi: Support reading/writing 16 bit EC values Hans de Goede
2024-03-06 10:19 ` Ilpo Järvinen
2024-03-06 17:57 ` Armin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=175fcdf2-255c-4cfe-9e5d-d349accb88d1@redhat.com \
--to=hdegoede@redhat.com \
--cc=W_Armin@gmx.de \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox