Re: [PATCH v3 1/6] asus-wmi: Implement TUF laptop keyboard RGB control

From: Andy Shevchenko
Date: Tue Aug 09 2022 - 04:47:27 EST


On Tue, Aug 9, 2022 at 4:51 AM Luke D. Jones <luke@xxxxxxxxxx> wrote:
>
> Adds support for TUF laptop RGB control via the multicolor LED API.
>
> As this is the bas for adjusting only the RGB values, it sets the
> default mode of the keyboard to static since there is no way to read
> any existing settings from the device. These defaults overwrite the
> booted state of the keyboard when the module is loaded.

...

> + err = asus_wmi_evaluate_method3(ASUS_WMI_METHODID_DEVS, ASUS_WMI_DEVID_TUF_RGB_MODE,
> + rgb->save | (rgb->mode << 8) | (r << 16) | (g << 24),
> + (b) | (rgb->speed << 8),

Too many parentheses.

> + &ret);
> + if (err)
> + dev_err(dev, "Unable to set TUF RGB data?\n");
> +
> + return err;

How ret is being used?

--
With Best Regards,
Andy Shevchenko