Thread (12 messages) 12 messages, 5 authors, 2021-10-18

Re: [PATCH v7 1/2] hwmon: (asus_wmi_ec_sensors) Support B550 Asus WMI.

From: Eugene Shalygin <eugene.shalygin@gmail.com>
Date: 2021-10-15 14:49:57
Also in: linux-hwmon, lkml, platform-driver-x86

Hi, Andy,

On Fri, 15 Oct 2021 at 16:37, Andy Shevchenko [off-list ref] wrote:
I didn't get it. If there is a strong endianess expected the parameter
should be __le16 or __be16, moreover it seems it missed the const
qualifier. Any preparatory stuff should be done in the
asus_wmi_ec_make_block_read_query() which prepares the input buffer,
doesn't it?
We need to produce and parse a, roughly speaking, hex-BSTR to pass it
to the WMI function (save for its size parameter of 16 bits instead of
32 for the BSTR). bin/hex conversion functions accept/output UTF-8
strings and thus require an intermediate buffer and additional utf-8
<-> utf-16 conversion. Do you insist that a loop with a stride of 4 is
a homegrown library already?
quoted
quoted
What's the point of calling acpi_os_free(obj) when you already know it's NULL?
The case when obj->type != ACPI_TYPE_BUFFER
Read my comment again, please.
I did it twice already and still can't understand. The WMI method can
return a string, for example, which is an error for our code, but the
buffer needs to be freed.

Regards,
Eugene
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help