Hi, On 3/10/22 22:08, Jorge Lopez wrote: > The purpose of this patch is to introduce a fix to hp_wmi_read_int() > and eliminate failure error (0x05). Several WMI queries leverage > hp_wmi_read_int() to read their data and were failing with error 0x05. > > HPWMI_DISPLAY_QUERY > HPWMI_HDDTEMP_QUERY > HPWMI_ALS_QUERY > HPWMI_HARDWARE_QUERY > HPWMI_WIRELESS_QUERY > HPWMI_POSTCODEERROR_QUERY > > The failure occurs because hp_wmi_read_int() calls > hp_wmi_perform_query() with input parameter of size greater than zero. > Invoking those WMI commands with an input buffer size greater than > zero causes the command to be rejected and error 0x05 be returned. > > All changes were validated on a HP ZBook Workstation notebook, > HP EliteBook x360, and HP EliteBook 850 G8. > > Signed-off-by: Jorge Lopez <jorge.lopez2@xxxxxx> 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 since your using a different email address then Signed-off-by to submit the patches, I've changed the From / Author of the patch to match the Signed-off-by while applying this patch (and the same for the other patches in the series). The patch 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 > > --- > Based on the latest platform-drivers-x86.git/for-next > --- > drivers/platform/x86/hp-wmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c > index 48a46466f086..103f56399ed0 100644 > --- a/drivers/platform/x86/hp-wmi.c > +++ b/drivers/platform/x86/hp-wmi.c > @@ -337,7 +337,7 @@ static int hp_wmi_read_int(int query) > int val = 0, ret; > > ret = hp_wmi_perform_query(query, HPWMI_READ, &val, > - sizeof(val), sizeof(val)); > + 0, sizeof(val)); > > if (ret) > return ret < 0 ? ret : -EINVAL;