diff mbox

ASoC: cs35l33: mark PM functions as __maybe_unused

Message ID 20160629143416.45214-1-arnd@arndb.de (mailing list archive)
State Accepted
Commit 20f12f2c4819a36de92ec6be382d0636d3485c6b
Headers show

Commit Message

Arnd Bergmann June 29, 2016, 2:33 p.m. UTC
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(-)

Comments

Paul Handrigan June 29, 2016, 2:48 p.m. UTC | #1
On 6/29/16, 9:33 AM, "Arnd Bergmann" <arnd@arndb.de> wrote:

>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

Thanks!

Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Mark Brown June 29, 2016, 4:23 p.m. UTC | #2
On Wed, Jun 29, 2016 at 02:48:15PM +0000, Handrigan, Paul wrote:
> On 6/29/16, 9:33 AM, "Arnd Bergmann" <arnd@arndb.de> wrote:

> > 
> >-- 
> >2.9.0

> Thanks!

> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>

Please delete unneeded context from mails when replying.  Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.
diff mbox

Patch

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);