All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
To: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
	Support Opensource <support.opensource@diasemi.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	Icenowy Zheng <icenowy@aosc.io>
Subject: Re: [PATCH 11/12] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
Date: Thu, 20 Aug 2020 16:32:32 +0800	[thread overview]
Message-ID: <20200820163232.54b59e1d@xhacker.debian> (raw)
In-Reply-To: <20fc45ab-4daf-3855-5817-1898d50c9efc@st.com>

On Thu, 20 Aug 2020 10:13:12 +0200 Fabrice Gasnier wrote:

> 
> 
> On 8/20/20 9:46 AM, Jisheng Zhang wrote:
> > Fix below warning when CONFIG_OF=n:
> >
> > drivers/regulator/stm32-vrefbuf.c:287:34: warning: ‘stm32_vrefbuf_of_match’ defined but not used [-Wunused-const-variable=]
> >   287 | static const struct of_device_id stm32_vrefbuf_of_match[] = {
> >       |                                  ^~~~~~~~~~~~~~~~~~~~~~
> >
> > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > ---
> >  drivers/regulator/stm32-vrefbuf.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
> > index 992bc18101ef..5a5c12d9ea22 100644
> > --- a/drivers/regulator/stm32-vrefbuf.c
> > +++ b/drivers/regulator/stm32-vrefbuf.c
> > @@ -284,11 +284,13 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
> >                          NULL)
> >  };
> >
> > +#ifdef CONFIG_OF  
> 
> Hi Jisheng,

Hi,

> 
> You could probably adopt "__maybe_unused" here ? E.g. like:

__maybe_unused also fixes the warning. I'm not sure the maintainers' preference.

Hi Mark,

which solution do you prefer?

Thanks in advance

> 
> static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = {
> 
> I can see other drivers use this already for the same.
> 
> Thanks,
> Best regards,
> Fabrice
> 
> >  static const struct of_device_id stm32_vrefbuf_of_match[] = {
> >       { .compatible = "st,stm32-vrefbuf", },
> >       {},
> >  };
> >  MODULE_DEVICE_TABLE(of, stm32_vrefbuf_of_match);
> > +#endif
> >
> >  static struct platform_driver stm32_vrefbuf_driver = {
> >       .probe = stm32_vrefbuf_probe,
> >  


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
To: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Support Opensource <support.opensource@diasemi.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Icenowy Zheng <icenowy@aosc.io>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH 11/12] regulator: stm32-vrefbuf: Fix W=1 build warning when CONFIG_OF=n
Date: Thu, 20 Aug 2020 16:32:32 +0800	[thread overview]
Message-ID: <20200820163232.54b59e1d@xhacker.debian> (raw)
In-Reply-To: <20fc45ab-4daf-3855-5817-1898d50c9efc@st.com>

On Thu, 20 Aug 2020 10:13:12 +0200 Fabrice Gasnier wrote:

> 
> 
> On 8/20/20 9:46 AM, Jisheng Zhang wrote:
> > Fix below warning when CONFIG_OF=n:
> >
> > drivers/regulator/stm32-vrefbuf.c:287:34: warning: ‘stm32_vrefbuf_of_match’ defined but not used [-Wunused-const-variable=]
> >   287 | static const struct of_device_id stm32_vrefbuf_of_match[] = {
> >       |                                  ^~~~~~~~~~~~~~~~~~~~~~
> >
> > Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
> > ---
> >  drivers/regulator/stm32-vrefbuf.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
> > index 992bc18101ef..5a5c12d9ea22 100644
> > --- a/drivers/regulator/stm32-vrefbuf.c
> > +++ b/drivers/regulator/stm32-vrefbuf.c
> > @@ -284,11 +284,13 @@ static const struct dev_pm_ops stm32_vrefbuf_pm_ops = {
> >                          NULL)
> >  };
> >
> > +#ifdef CONFIG_OF  
> 
> Hi Jisheng,

Hi,

> 
> You could probably adopt "__maybe_unused" here ? E.g. like:

__maybe_unused also fixes the warning. I'm not sure the maintainers' preference.

Hi Mark,

which solution do you prefer?

Thanks in advance

> 
> static const struct of_device_id __maybe_unused stm32_vrefbuf_of_match[] = {
> 
> I can see other drivers use this already for the same.
> 
> Thanks,
> Best regards,
> Fabrice
> 
> >  static const struct of_device_id stm32_vrefbuf_of_match[] = {
> >       { .compatible = "st,stm32-vrefbuf", },
> >       {},
> >  };
> >  MODULE_DEVICE_TABLE(of, stm32_vrefbuf_of_match);
> > +#endif
> >
> >  static struct platform_driver stm32_vrefbuf_driver = {
> >       .probe = stm32_vrefbuf_probe,
> >  


  reply	other threads:[~2020-08-20  8:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200820152926.42c48840@xhacker.debian>
2020-08-20  7:32 ` [PATCH 01/12] regulator: 88pg86x: Fix W=1 build warning when CONFIG_OF=n Jisheng Zhang
2020-08-20  7:32   ` Jisheng Zhang
2020-08-20  7:33 ` [PATCH 02/12] regulator: da9210: " Jisheng Zhang
2020-08-20  7:33   ` Jisheng Zhang
2020-08-20  7:34 ` [PATCH 03/12] regulator: fan53555: " Jisheng Zhang
2020-08-20  7:34   ` Jisheng Zhang
2020-08-20  7:34 ` [PATCH 04/12] regulator: fixed: Fix W=1 build warnings " Jisheng Zhang
2020-08-20  7:34   ` Jisheng Zhang
2020-08-20  7:35 ` [PATCH 05/12] regulator: ltc3589: Fix W=1 build warning " Jisheng Zhang
2020-08-20  7:35   ` Jisheng Zhang
2020-08-20  7:36 ` [PATCH 06/12] regulator: ltc3676: " Jisheng Zhang
2020-08-20  7:36   ` Jisheng Zhang
2020-08-20  7:37 ` [PATCH 07/12] regulator: max1586: " Jisheng Zhang
2020-08-20  7:37   ` Jisheng Zhang
2020-08-20  7:37 ` [PATCH 08/12] regulator: max77826: " Jisheng Zhang
2020-08-20  7:37   ` Jisheng Zhang
2020-08-20  7:38 ` [PATCH 09/12] regulator: pwm: " Jisheng Zhang
2020-08-20  7:38   ` Jisheng Zhang
2020-08-20  7:46 ` [PATCH 11/12] regulator: stm32-vrefbuf: " Jisheng Zhang
2020-08-20  7:46   ` Jisheng Zhang
2020-08-20  8:13   ` Fabrice Gasnier
2020-08-20  8:13     ` Fabrice Gasnier
2020-08-20  8:32     ` Jisheng Zhang [this message]
2020-08-20  8:32       ` Jisheng Zhang
2020-08-20 10:51       ` Mark Brown
2020-08-20 10:51         ` Mark Brown
2020-08-20  7:47 ` [PATCH 12/12] regulator: sy8106a: " Jisheng Zhang
2020-08-20  7:47   ` Jisheng Zhang
2020-08-20  8:00 ` [PATCH 10/12] regulator: stm32-pwr: " Jisheng Zhang
2020-08-20  8:00   ` Jisheng Zhang

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=20200820163232.54b59e1d@xhacker.debian \
    --to=jisheng.zhang@synaptics.com \
    --cc=alexandre.torgue@st.com \
    --cc=broonie@kernel.org \
    --cc=fabrice.gasnier@st.com \
    --cc=icenowy@aosc.io \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=support.opensource@diasemi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.