[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VdztEuQbvEbirrzqYOdYjNrJADgwC5O40fU_BzsxEmWXg@mail.gmail.com>
Date: Fri, 2 Aug 2024 01:15:08 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-pwm@...r.kernel.org,
Bartosz Golaszewski <brgl@...ev.pl>, Conor Dooley <conor+dt@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Lee Jones <lee@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>, Rob Herring <robh@...nel.org>,
Uwe Kleine-König <ukleinek@...nel.org>,
Haibo Chen <haibo.chen@....com>
Subject: Re: [PATCH v4 3/4] gpio: adp5585: Add Analog Devices ADP5585 support
On Fri, Jul 19, 2024 at 3:55 PM Laurent Pinchart
<laurent.pinchart@...asonboard.com> wrote:
> On Mon, Jun 10, 2024 at 07:29:09PM +0300, Andy Shevchenko wrote:
> > On Mon, Jun 10, 2024 at 6:26 PM Laurent Pinchart wrote:
> > > On Mon, Jun 10, 2024 at 06:15:40PM +0300, Andy Shevchenko wrote:
> > > > Sat, Jun 08, 2024 at 05:16:32PM +0300, Laurent Pinchart kirjoitti:
...
> > > > > +static const struct platform_device_id adp5585_gpio_id_table[] = {
> > > > > + { "adp5585-gpio" },
> > > >
> > > > > + { /* Sentinel */ },
> > > >
> > > > Drop the comma.
> > >
> > > I prefer keeping it.
> >
> > For what reason?
> > The sentinel should be runtime and compile time one. Why should we
> > make our lives worse by neglecting help from a compiler?
>
> Do you really think there's a risk here and that this will make a
> difference ?
There are two aspects (or more?):
1) potential mis-rebase or other thing that makes possible to have an
entry _after_ the terminator and having it being compiled
successfully, while we may prevent this from happening on the
compilation phase (as you noticed this is quite unlikely to happen
IRL);
2) educational part, as somebody may use your code as a good standard.
> I do appreciate most of your review comments, even
> pendantic ones, as they can help making the code better, but we also all
> need a little bit of space to breathe when it comes to coding style.
Some of the coding style decisions can be considered slightly better
than others. I have a rationale for this case. But of course, it's up
to you and the subsystem maintainer on how to proceed with this. I
wouldn't take your breath away.
> > > > > +};
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists