Re: [PATCH v2] ata: Drop commas after OF match table sentinels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kieran,

On Thu, Mar 3, 2022 at 12:40 PM Kieran Bingham
<kieran.bingham@xxxxxxxxxxxxxxxx> wrote:
> Quoting Geert Uytterhoeven (2022-03-03 08:36:35)
> > It does not make sense to have a comma after a sentinel, as any new
> > elements must be added before the sentinel.
>
> Indeed.
>
> > Add comments to clarify the purpose of the empty elements.
> > Rewrap entries to a single line to have a consistent style.
>
> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>

Thanks!

>
git grep "{ }," | wc -l
> 2638
> git grep "{}," | wc -l
> 2088
>
> Lots of false positives in that basic search, but this looks like a big
> job. Is this something that could be added to checkstyle?
>
> Probably hard to match when it's a sentinal, rather than an initialiser
> ... so perhaps a coccinelle task.

Yes, there are _lots_ of these.

I fixed the ca. 50 cases involving Renesas-specific compatible values,
and picked up the ata subsystem for a first run.  But fixing all of them
looks like a lot of work, so automation might help.

For soc_device_attribute tables, there are less cases, so I'll just
send the handful patches to fix all of them...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux