From: Bartu Alev <bartualev@gmail.com>
To: "Denis Benato" <denis.benato@linux.dev>,
"Corentin Chary" <corentin.chary@gmail.com>,
"Luke D. Jones" <luke@ljones.dev>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] platform/asus: asus-wmi: Document asus_wmi_evaluate_method_buf()
Date: Wed, 2 Dec 2026 18:16:31 +0300 [thread overview]
Message-ID: <3c484c2e-c6a3-4a62-b1ad-7bfe7aa82c87@gmail.com> (raw)
In-Reply-To: <177a8ebd-aabb-4178-8a7d-d8827a983e8f@linux.dev>
On 12/2/26 5:50 AM, Denis Benato wrote:
> This is confusing to me, can you make it shorter?
>
> "Anything other than a buffer is reported as an error"... anything what?
> The answer?
>
> The sentence "The firmware answers with an integer instead" doesn't
> make sense to me, probably because it's too convoluted and mixing
> implementation details, ACPI asus methods and function inner working.
yes, that wording was overly convoluted and leaked internal details.
would a shorter version like this work for v2?
/**
* asus_wmi_evaluate_method_buf() - Evaluate a WMI method returning a buffer
* @method_id: WMI method ID to evaluate (e.g. %ASUS_WMI_METHODID_DSTS)
* @arg0: First method argument, usually the device ID
* @arg1: Second method argument
* @ret_buffer: Caller buffer to copy the returned ACPI buffer into
* @size: Size of @ret_buffer in bytes
*
* Evaluate @method_id and copy the returned ACPI buffer into @ret_buffer.
* If the reply is shorter than @size, only the returned bytes are copied
* and the remainder of @ret_buffer is left untouched.
*
* Non-buffer ACPI replies are treated as errors:
%ASUS_WMI_UNSUPPORTED_METHOD
* (0xfffffffe) and 0xffffffff map to -ENODEV, while any other integer
* (such as 0 when an argument is omitted) or unexpected object type maps
* to -ENODATA.
*
* Return:
* * %0 - Success, buffer copied into @ret_buffer.
* * %-EIO - WMI method evaluation failed.
* * %-ENODEV - Firmware reported the device or method as unsupported.
* * %-ENOSPC - Returned buffer is larger than @size.
* * %-ENODATA - No object returned, empty buffer, or unexpected reply.
*/
prev parent reply other threads:[~2026-12-02 15:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 23:31 [PATCH 0/3] platform/asus: asus-wmi: harden asus_wmi_evaluate_method_buf() Bartu Alev
2026-12-01 23:31 ` [PATCH 1/3] platform/asus: asus-wmi: Fix NULL deref and integer handling in asus_wmi_evaluate_method_buf() Bartu Alev
2026-12-02 2:40 ` Denis Benato
2026-12-02 14:52 ` bartu alev
2026-12-01 23:31 ` [PATCH 2/3] platform/asus: asus-wmi: Use __free(kfree) " Bartu Alev
2026-12-02 2:45 ` Denis Benato
2026-12-02 15:13 ` Bartu Alev
2026-12-01 23:31 ` [PATCH 3/3] platform/asus: asus-wmi: Document asus_wmi_evaluate_method_buf() Bartu Alev
2026-12-02 2:50 ` Denis Benato
2026-12-02 15:16 ` Bartu Alev [this message]
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=3c484c2e-c6a3-4a62-b1ad-7bfe7aa82c87@gmail.com \
--to=bartualev@gmail.com \
--cc=corentin.chary@gmail.com \
--cc=denis.benato@linux.dev \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--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
all inboxes | Powered by JetHome®