lkml.org 
[lkml]   [2022]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH RESEND v11] platform/chrome: Add ChromeOS ACPI device driver
On Wed, May 11, 2022 at 5:59 PM Muhammad Usama Anjum
<usama.anjum@collabora.com> wrote:
> On 5/10/22 2:33 PM, Andy Shevchenko wrote:
> > On Tue, May 10, 2022 at 8:44 AM Muhammad Usama Anjum
> > <usama.anjum@collabora.com> wrote:

...

> >> + static struct attribute *attrs_##_group[] = { \
> >> + &dev_attr_0_##_group.attr, \
> >> + &dev_attr_1_##_group.attr, \
> >> + &dev_attr_2_##_group.attr, \
> >> + &dev_attr_3_##_group.attr, \
> >> + NULL \

(1)

> >> + }; \
> >> + static const struct attribute_group attr_group_##_group = { \
> >> + .name = _name, \
> >> + .is_visible = attr_is_visible_gpio_##_num, \
> >
> >> + .attrs = attrs_##_group \
> >
> > Keep a comma here.

> Is there any particular reason for it?

Yes, if it's not a terminator entry, like (1), the comma would help to
avoid unneeded churm in the future in case someone wants to add
another initialization member.

> If there is, I'll add commas to
> all the structures.

It depends if it is a terminator entry or not, so please check
carefully where to add and where not (the latter example is (1) where
comma is not needed and theoretically might add a confusion).

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-05-11 19:42    [W:0.164 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site