The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: rt5514: mark PM functions as __maybe_unused
@ 2017-11-10 14:54 Arnd Bergmann
  2017-11-10 14:54 ` [PATCH 2/2] ASoC: rt5514: work around link error Arnd Bergmann
  2017-11-10 21:29 ` Applied "ASoC: rt5514: mark PM functions as __maybe_unused" " Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-11-10 14:54 UTC (permalink / raw)
  To: Bard Liao, Mark Brown
  Cc: Arnd Bergmann, Oder Chiou, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Hsin-Yu Chao, Chinyue Chen, Bhumika Goyal,
	alsa-devel, linux-kernel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-10 21:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-10 14:54 [PATCH 1/2] ASoC: rt5514: mark PM functions as __maybe_unused Arnd Bergmann
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox