Re: [PATCH] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-13 Thread Miguel Ojeda
On Sun, Dec 13, 2020 at 7:21 PM Joe Perches wrote: > > clang-format is not a tool to rewrite code only neaten its layout. > > coccinelle _might_ be able to do this for limited cases where the > show function is in the same compilation unit/file, but even then > it would not be a trivial script.

Re: [PATCH] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-13 Thread Joe Perches
On Sun, 2020-12-13 at 13:48 +0530, Dwaipayan Ray wrote: > On Sun, Dec 13, 2020 at 1:31 PM Lukas Bulwahn wrote: [] > > Will you also add a checkpatch rule to identify other DEVICE_ATTR(...) > > that can be adjusted to the refined macros, so that checkpatch informs > > other submitters as well? > >

Re: [PATCH] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-13 Thread Dwaipayan Ray
On Sun, Dec 13, 2020 at 1:31 PM Lukas Bulwahn wrote: > > On Sat, Dec 12, 2020 at 8:56 PM Dwaipayan Ray wrote: > > > > Instead of open coding DEVICE_ATTR() defines, use the > > DEVICE_ATTR_RW(), DEVICE_ATTR_WO(), and DEVICE_ATTR_RO() > > macros intead. > > typo: s/intead/instead/ > > No need to

Re: [PATCH] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-13 Thread Lukas Bulwahn
On Sat, Dec 12, 2020 at 8:56 PM Dwaipayan Ray wrote: > > Instead of open coding DEVICE_ATTR() defines, use the > DEVICE_ATTR_RW(), DEVICE_ATTR_WO(), and DEVICE_ATTR_RO() > macros intead. typo: s/intead/instead/ No need to use the word "instead" twice in one sentence, though, we got it :) > >

[PATCH] leds: Use DEVICE_ATTR_{RW, RO, WO} macros

2020-12-12 Thread Dwaipayan Ray
Instead of open coding DEVICE_ATTR() defines, use the DEVICE_ATTR_RW(), DEVICE_ATTR_WO(), and DEVICE_ATTR_RO() macros intead. This required a few functions to be renamed, but the functionality itself is unchanged. Note that this is compile tested only. Cc: Greg Kroah-Hartman Cc: Dan Murphy