Re: [PATCH 1/5] asus-wmi: Add basic support for TUF laptop keyboard RGB
From: Andy Shevchenko
Date: Sat Aug 06 2022 - 06:27:47 EST
On Sat, Aug 6, 2022 at 12:16 PM Luke Jones <luke@xxxxxxxxxx> wrote:
> On Sat, Aug 6 2022 at 11:44:33 +0200, Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> > On Fri, Aug 5, 2022 at 10:20 AM Luke D. Jones <luke@xxxxxxxxxx> wrote:
...
> >> #include <linux/leds.h>
> >> +#include <linux/led-class-multicolor.h>
> >
> > Not sure about the ordering ('-' vs. 's') in locale C.
>
> I used hid-playstation.c as a reference and followed that ordering.
Try something like this:
LC_ALL=c sort
for these two lines and see if the ordering is the same.
...
> >> + if (err) {
> >> + pr_err("Unable to set TUF RGB data?\n");
> >
> > Why not dev_err() ?
>
> I didn't know about it? Is there an example or doc on its use?
Thousands of examples in the kernel source tree. The point is if you
have a device (instance) available, use it for messaging.
> >> + return err;
> >> + }
> >> + return 0;
> >
> > return err;
>
> Something like this then?
>
> if (err) {
> pr_err("Unable to set TUF RGB data?\n");
> }
> return err;
>
> If so, done.
No parentheses. Have you run checkpatch.pl?
Something like
if (err)
dev_err(...);
return err;
> >> +}
--
With Best Regards,
Andy Shevchenko