Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433797

[PATCH] ASoC: cs35l33: mark PM functions as __maybe_unused

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH] ASoC: cs35l33: mark PM functions as __maybe_unused
Date 2016-06-29 16:40 +0200
Message-ID <rPoOK-5l8-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The newly added cs35l33 driver produces a harmless warning when
CONFIG_PM is disabled:

sound/soc/codecs/cs35l33.c:908:12: error: 'cs35l33_runtime_suspend' defined but not used [-Werror=unused-function]
sound/soc/codecs/cs35l33.c:868:12: error: 'cs35l33_runtime_resume' defined but not used [-Werror=unused-function]

This adds __maybe_unused annotations to shut up the warning
regardless of the configuration.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/codecs/cs35l33.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 622a1111b21c..d8b5fc3fc45d 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -862,7 +862,7 @@ static const struct regmap_config cs35l33_regmap = {
 	.use_single_rw = true,
 };
 
-static int cs35l33_runtime_resume(struct device *dev)
+static int __maybe_unused cs35l33_runtime_resume(struct device *dev)
 {
 	struct cs35l33_private *cs35l33 = dev_get_drvdata(dev);
 	int ret;
@@ -902,7 +902,7 @@ err:
 	return ret;
 }
 
-static int cs35l33_runtime_suspend(struct device *dev)
+static int __maybe_unused cs35l33_runtime_suspend(struct device *dev)
 {
 	struct cs35l33_private *cs35l33 = dev_get_drvdata(dev);
 
-- 
2.9.0

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] ASoC: cs35l33: mark PM functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-06-29 16:40 +0200
  Re: [PATCH] ASoC: cs35l33: mark PM functions as __maybe_unused "Handrigan, Paul" <Paul.Handrigan@cirrus.com> - 2016-06-29 16:50 +0200
    Re: [PATCH] ASoC: cs35l33: mark PM functions as __maybe_unused Mark Brown <broonie@kernel.org> - 2016-06-29 18:30 +0200
  Applied "ASoC: cs35l33: mark PM functions as __maybe_unused" to the asoc tree Mark Brown <broonie@kernel.org> - 2016-06-29 20:10 +0200

csiph-web