lkml.org 
[lkml]   [2022]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/5] asus-wmi: Add basic support for TUF laptop keyboard RGB
On Sat, Aug 6, 2022 at 12:16 PM Luke Jones <luke@ljones.dev> wrote:
> On Sat, Aug 6 2022 at 11:44:33 +0200, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Fri, Aug 5, 2022 at 10:20 AM Luke D. Jones <luke@ljones.dev> 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

\
 
 \ /
  Last update: 2022-08-06 12:28    [W:0.062 / U:7.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site