lkml.org 
[lkml]   [2018]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v9 2/3] x86: add support for Huawei WMI hotkeys.
On Mon, Dec 3, 2018 at 9:04 PM Takashi Iwai <tiwai@suse.de> wrote:
>
> On Mon, 03 Dec 2018 19:53:39 +0100,
> Ayman Bagabas wrote:
> > + if (code == 0x80) {
> > + acpi_status status;
> > + acpi_handle handle;
> > + unsigned long long result;
> > + union acpi_object args[1];
> > + struct acpi_object_list arg_list = {
> > + .pointer = args,
> > + .count = ARRAY_SIZE(args),
> > + };
> > +
> > + args[0].type = ACPI_TYPE_INTEGER;
> > + args[0].integer.value = 0;
> > +
> > + status = acpi_get_handle(NULL, "\\WMI0", &handle);
> > + if (ACPI_FAILURE(status)) {
> > + dev_err(&wdev->dev, "Unable to get ACPI handle\n");
> > + return;
> > + }
> > +
> > + status = acpi_evaluate_integer(NULL, "WQ00", &arg_list, &result);
>
> I guess you need to pass handle here? In the earlier version, you
> passed \\WMI0.WQ00, so it worked with NULL handle. But now it's no
> longer so...

I think in this case we don't need to have a separate call to get
handle and try to get integer directly. In either we will have an
error case if method / namespace / etc is not found.

> Other than that, it looks OK to me.
> Reviewed-by: Takashi Iwai <tiwai@suse.de>
>
> But, you don't need to rush too much. Instead, better to test your
> own patches and make sure that they really work before submitting the
> final version.

Yes, I will wait couple of days for v10 in hope it will be tested carefully.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-12-03 20:19    [W:0.127 / U:19.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site