lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFqH_52v3-L1xLL12hzyGCbuooX5T52Lm7BXHM3sBX1ERWmhiQ@mail.gmail.com>
Date:   Tue, 26 Jun 2018 16:24:37 +0200
From:   Enric Balletbo Serra <eballetbo@...il.com>
To:     matti.vaittinen@...rohmeurope.com
Cc:     Michael Turquette <mturquette@...libre.com>, sboyd@...nel.org,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Lee Jones <lee.jones@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Matti Vaittinen <mazziesaccount@...il.com>,
        Arnd Bergmann <arnd@...db.de>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Sebastian Reichel <sre@...nel.org>, chenjh@...k-chips.com,
        Andrey Smirnov <andrew.smirnov@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Heiko Stübner <heiko@...ech.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-clk@...r.kernel.org,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-input@...r.kernel.org, mikko.mutanen@...rohmeurope.com,
        heikki.haikola@...rohmeurope.com
Subject: Re: [PATCH v7 1/4] mfd: bd71837: mfd driver for ROHM BD71837 PMIC

Hi Matti,

Missatge de Matti Vaittinen <matti.vaittinen@...rohmeurope.com> del
dia dt., 26 de juny 2018 a les 14:03:
>
> Hello Again Eric,
>
> On Tue, Jun 26, 2018 at 01:40:40PM +0200, Enric Balletbo Serra wrote:
> > Hi Matti,
> > Missatge de Matti Vaittinen <matti.vaittinen@...rohmeurope.com> del
> > dia dt., 26 de juny 2018 a les 13:25:
> > > On Tue, Jun 26, 2018 at 11:06:33AM +0200, Enric Balletbo Serra wrote:
> > > > Missatge de Matti Vaittinen <matti.vaittinen@...rohmeurope.com> del
> > > > dia dt., 19 de juny 2018 a les 12:57:
> > >
> > > > > +static const struct of_device_id bd71837_of_match[] = {
> > > > > +       { .compatible = "rohm,bd71837", .data = (void *)0},
> > > > > +       { },
> > > >
> > > > nit: { /* sentinel */ }
> > >
> > > I am sorry but I didn't quite get the point here. Could you please
> > > explain what did you expect to be added here?
> > >
> >
> > It's a nit but It is a good practice to specify that the last entry is
> > a sentinel. Just this.
> >
> > +static const struct of_device_id bd71837_of_match[] = {
> > +       { .compatible = "rohm,bd71837", .data = (void *)0},
> > +       { /* sentinel */ }
> > +};
>
> Oh, I see. Finally something I can disagree =) I quickly opened few
> random drivers which declare match table. None of them practiced this
> good practice. So I guess it is not such a standard after all. And I
> guess the meaning of last entry in match table should be quite obvious.
> Adding the comment /* sentinel */ sounds like stating the obvious at
> best - at worst it gets one just to wonder what the "sentinel" means =)
>

git grep "/\* sentinel \*/"

Anyway, I marked this change as a nit, so you don't need to change. I
just commented because at some point I received a "complain" when I
didn't add it. But this is up to the maintainer and I am not sure if
the "complain" was received in this subsystem :)

Cheers,
 Enric

> >
> > And just noticed, is .data = (void *)0 really required?
>
> As static structs should be initialized to zero I'd say it is not
> required. Will remove this. Thanks for pointing this out.
>
> Br,
>         Matti Vaittinen
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ