From: Arnd Bergmann <arnd@arndb.de>
To: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kamil Debski <kamil@wypas.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused
Date: Wed, 29 Jun 2016 16:26:34 +0200 [thread overview]
Message-ID: <20160629142749.4125434-1-arnd@arndb.de> (raw)
The suspend/resume functions in the s5p-cec driver are only
referenced when CONFIG_PM is enabled, so we get a warning
about unused functions otherwise:
drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function]
static int s5p_cec_resume(struct device *dev)
^~~~~~~~~~~~~~
drivers/staging/media/s5p-cec/s5p_cec.c:253:12: error: 's5p_cec_suspend' defined but not used [-Werror=unused-function]
static int s5p_cec_suspend(struct device *dev)
This marks them as __maybe_unused to avoid the warning without
having to introduce an extra #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/media/s5p-cec/s5p_cec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c
index f90b7c4e48fe..78333273c4e5 100644
--- a/drivers/staging/media/s5p-cec/s5p_cec.c
+++ b/drivers/staging/media/s5p-cec/s5p_cec.c
@@ -250,14 +250,14 @@ static int s5p_cec_runtime_resume(struct device *dev)
return 0;
}
-static int s5p_cec_suspend(struct device *dev)
+static int __maybe_unused s5p_cec_suspend(struct device *dev)
{
if (pm_runtime_suspended(dev))
return 0;
return s5p_cec_runtime_suspend(dev);
}
-static int s5p_cec_resume(struct device *dev)
+static int __maybe_unused s5p_cec_resume(struct device *dev)
{
if (pm_runtime_suspended(dev))
return 0;
--
2.9.0
next reply other threads:[~2016-06-29 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 14:26 Arnd Bergmann [this message]
2016-06-29 14:26 ` [PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency Arnd Bergmann
2016-06-29 14:26 ` [PATCH 3/3] [media] cec: add RC_CORE dependency Arnd Bergmann
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=20160629142749.4125434-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hans.verkuil@cisco.com \
--cc=kamil@wypas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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).