The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Bard Liao <bardliao@realtek.com>, Mark Brown <broonie@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Oder Chiou <oder_chiou@realtek.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Hsin-Yu Chao <hychao@chromium.org>,
	Chinyue Chen <chinyue@chromium.org>,
	Bhumika Goyal <bhumirks@gmail.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] ASoC: rt5514: mark PM functions as __maybe_unused
Date: Fri, 10 Nov 2017 15:54:42 +0100	[thread overview]
Message-ID: <20171110145455.821805-1-arnd@arndb.de> (raw)

The new functions are only used when CONFIG_PM is enabled,
leading to a harmless warning:

sound/soc/codecs/rt5514-spi.c:474:12: error: 'rt5514_resume' defined but not used [-Werror=unused-function]
sound/soc/codecs/rt5514-spi.c:464:12: error: 'rt5514_suspend' defined but not used [-Werror=unused-function]

This marks them as __maybe_unused to make the build silent
again.

Fixes: 58f1c07d23cd ("ASoC: rt5514: Voice wakeup support.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/codecs/rt5514-spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c
index 36e0a58ffc87..2df91db765ac 100644
--- a/sound/soc/codecs/rt5514-spi.c
+++ b/sound/soc/codecs/rt5514-spi.c
@@ -461,7 +461,7 @@ static int rt5514_spi_probe(struct spi_device *spi)
 	return 0;
 }
 
-static int rt5514_suspend(struct device *dev)
+static int __maybe_unused rt5514_suspend(struct device *dev)
 {
 	int irq = to_spi_device(dev)->irq;
 
@@ -471,7 +471,7 @@ static int rt5514_suspend(struct device *dev)
 	return 0;
 }
 
-static int rt5514_resume(struct device *dev)
+static int __maybe_unused rt5514_resume(struct device *dev)
 {
 	struct snd_soc_platform *platform = snd_soc_lookup_platform(dev);
 	struct rt5514_dsp *rt5514_dsp =
-- 
2.9.0

             reply	other threads:[~2017-11-10 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 14:54 Arnd Bergmann [this message]
2017-11-10 14:54 ` [PATCH 2/2] ASoC: rt5514: work around link error Arnd Bergmann
2017-11-10 21:29   ` Applied "ASoC: rt5514: work around link error" to the asoc tree Mark Brown
2017-11-10 21:29 ` Applied "ASoC: rt5514: mark PM functions as __maybe_unused" " Mark Brown

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=20171110145455.821805-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=bhumirks@gmail.com \
    --cc=broonie@kernel.org \
    --cc=chinyue@chromium.org \
    --cc=hychao@chromium.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oder_chiou@realtek.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox