linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: "tiwai@suse.de" <tiwai@suse.de>,
	"broonie@kernel.org" <broonie@kernel.org>,
	Support Opensource <Support.Opensource@diasemi.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 04/11] ASoC: codecs: da7219: fix 'defined but not used' warning
Date: Fri, 3 Jul 2020 09:57:46 +0000	[thread overview]
Message-ID: <DB6PR1001MB1096D4378397C76A4CFEAF28806A0@DB6PR1001MB1096.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <DB6PR1001MB1096535996028B7DE0D136DC806A0@DB6PR1001MB1096.EURPRD10.PROD.OUTLOOK.COM>

On 03 July 2020 10:33, Adam Thomson wrote

> On 01 July 2020 19:24, Pierre-Louis Bossart wrote:
> 
> > fix W=1 warning
> >
> > sound/soc/codecs/da7219.c:1711:36: warning: 'da7219_acpi_match'
> > defined but not used [-Wunused-const-variable=]
> >  1711 | static const struct acpi_device_id da7219_acpi_match[] = {
> >       |                                    ^~~~~~~~~~~~~~~~~
> >
> > Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> > ---
> >  sound/soc/codecs/da7219.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
> > index f2520a6c7875..153ea30b5a8f 100644
> > --- a/sound/soc/codecs/da7219.c
> > +++ b/sound/soc/codecs/da7219.c
> > @@ -1708,11 +1708,13 @@ static const struct of_device_id da7219_of_match[]
> =
> > {
> >  };
> >  MODULE_DEVICE_TABLE(of, da7219_of_match);
> >
> > +#ifdef CONFIG_ACPI
> >  static const struct acpi_device_id da7219_acpi_match[] = {
> >  	{ .id = "DLGS7219", },
> >  	{ }
> >  };
> >  MODULE_DEVICE_TABLE(acpi, da7219_acpi_match);
> > +#endif
> 
> I think this will break non-ACPI builds as this symbol is used in the
> declaration of 'da7219_i2c_driver', without conditional compilation surrounding
> it. Unless of course I'm missing something. Could we instead use
> '__maybe_unused' to avoid this warning?

Obviously a slow start to the day for my brain. You've obviously built test this
given the intention behind this is for non-ACPI builds. Will get more coffee
shortly.

Still wonder if '__maybe_unused' might be nicer as per suspend/resume functions
on platforms which don't include PM_OPS. Either way though:

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>

> 
> >
> >  static enum da7219_micbias_voltage
> >  	da7219_fw_micbias_lvl(struct device *dev, u32 val)
> > --
> > 2.25.1


  reply	other threads:[~2020-07-03  9:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200701182422.81496-1-pierre-louis.bossart@linux.intel.com>
2020-07-01 18:24 ` [PATCH 01/11] ASoC: codecs: ak4458: fix 'set but not used' warning Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 02/11] ASoC: codecs: cros_ec_codec: fix 'defined " Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 03/11] ASoC: codecs: da7210: fix kernel-doc Pierre-Louis Bossart
2020-07-03  9:22   ` Adam Thomson
2020-07-01 18:24 ` [PATCH 04/11] ASoC: codecs: da7219: fix 'defined but not used' warning Pierre-Louis Bossart
2020-07-03  9:33   ` Adam Thomson
2020-07-03  9:57     ` Adam Thomson [this message]
2020-07-01 18:24 ` [PATCH 05/11] ASoC: codecs: es8316: " Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 06/11] ASoC: codecs: max98390: " Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 07/11] ASoC: codecs: rt*: " Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 08/11] ASoC: codecs: rt5659: add _maybe_unused as needed Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 09/11] ASoC: codecs: rt5631: fix kernel-doc Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 10/11] ASoC: codecs: tlv320aic26: fix kernel-doc warning Pierre-Louis Bossart
2020-07-01 18:24 ` [PATCH 11/11] ASoC: codecs: jz4770: add _maybe_unused as needed Pierre-Louis Bossart

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=DB6PR1001MB1096D4378397C76A4CFEAF28806A0@DB6PR1001MB1096.EURPRD10.PROD.OUTLOOK.COM \
    --to=adam.thomson.opensource@diasemi.com \
    --cc=Support.Opensource@diasemi.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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).