From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: Enric Balletbo Serra <eballetbo@gmail.com>
Cc: "Michael Turquette" <mturquette@baylibre.com>,
sboyd@kernel.org, "Rob Herring" <robh+dt@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Lee Jones" <lee.jones@linaro.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
mazziesaccount@gmail.com, "Arnd Bergmann" <arnd@arndb.de>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Sebastian Reichel" <sre@kernel.org>,
chenjh@rock-chips.com, andrew.smirnov@gmail.com,
"Linus Walleij" <linus.walleij@linaro.org>,
"Kate Stewart" <kstewart@linuxfoundation.org>,
"Heiko Stübner" <heiko@sntech.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-clk@vger.kernel.org,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-input@vger.kernel.
Subject: Re: [PATCH v7 1/4] mfd: bd71837: mfd driver for ROHM BD71837 PMIC
Date: Tue, 26 Jun 2018 15:03:06 +0300 [thread overview]
Message-ID: <20180626120306.GD2118@localhost.localdomain> (raw)
In-Reply-To: <CAFqH_52NERfORwSkBh0stW+mvzRpw0to9CiWPwLB9mFo_TsW_w@mail.gmail.com>
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@fi.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@fi.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 =)
>
> 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
next prev parent reply other threads:[~2018-06-26 12:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 10:55 [PATCH v7 0/4] mfd/regulator/clk/input: bd71837: ROHM BD71837 PMIC driver Matti Vaittinen
2018-06-19 10:55 ` [PATCH v7 1/4] mfd: bd71837: mfd driver for ROHM BD71837 PMIC Matti Vaittinen
2018-06-26 9:06 ` Enric Balletbo Serra
2018-06-26 11:24 ` Matti Vaittinen
2018-06-26 11:40 ` Enric Balletbo Serra
2018-06-26 12:03 ` Matti Vaittinen [this message]
2018-06-26 14:24 ` Enric Balletbo Serra
2018-07-03 6:56 ` Lee Jones
2018-07-03 8:09 ` Enric Balletbo Serra
2018-07-03 6:53 ` Lee Jones
2018-07-04 14:56 ` Dmitry Torokhov
2018-07-04 16:57 ` Enric Balletbo Serra
2018-07-05 5:52 ` Lee Jones
2018-07-05 7:56 ` Matti Vaittinen
2018-07-06 6:38 ` Dmitry Torokhov
2018-07-06 7:05 ` Lee Jones
2018-07-06 7:49 ` Matti Vaittinen
2018-06-19 10:56 ` [PATCH v7 2/4] mfd: bd71837: Devicetree bindings " Matti Vaittinen
2018-06-19 10:56 ` [PATCH v7 3/4] clk: bd71837: Add driver for BD71837 PMIC clock Matti Vaittinen
2018-06-19 10:57 ` [PATCH v7 4/4] input/power: Add driver for BD71837/BD71847 PMIC power button Matti Vaittinen
2018-06-19 17:50 ` Dmitry Torokhov
2018-06-20 6:43 ` Matti Vaittinen
2018-06-21 10:25 ` Matti Vaittinen
2018-06-27 0:21 ` Dmitry Torokhov
2018-06-21 10:34 ` [PATCH v7 0/4] mfd/regulator/clk/input: bd71837: ROHM BD71837 PMIC driver Matti Vaittinen
2018-07-03 7:02 ` Lee Jones
2018-07-04 8:47 ` Matti Vaittinen
2018-07-04 9:21 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180626120306.GD2118@localhost.localdomain \
--to=matti.vaittinen@fi.rohmeurope.com \
--cc=andrew.smirnov@gmail.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=chenjh@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=eballetbo@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=kstewart@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-input@vger.kernel. \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mazziesaccount@gmail.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).