Messages in this thread | | | From | Andy Shevchenko <> | Date | Wed, 11 May 2022 19:40:31 +0200 | Subject | Re: [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
| |