From: Arnd Bergmann <arnd@arndb.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Simon Horman <horms+renesas@verge.net.au>,
Chris Brandt <chris.brandt@renesas.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] usb: renesas_usbhs: mark PM functions as __maybe_unused
Date: Tue, 11 Dec 2018 11:06:25 +0100 [thread overview]
Message-ID: <20181211100645.650975-1-arnd@arndb.de> (raw)
Without CONFIG_PM, we get a new build warning here:
drivers/usb/renesas_usbhs/common.c:860:12: error: 'usbhsc_resume' defined but not used [-Werror=unused-function]
static int usbhsc_resume(struct device *dev)
^~~~~~~~~~~~~
drivers/usb/renesas_usbhs/common.c:844:12: error: 'usbhsc_suspend' defined but not used [-Werror=unused-function]
static int usbhsc_suspend(struct device *dev)
^~~~~~~~~~~~~~
No idea why this never happened before, but it's trivial to work
around by marking the functions as __maybe_unused so the compiler
can silently discard them.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/usb/renesas_usbhs/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 02c1d2bf4f86..2ff7991f4517 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -841,7 +841,7 @@ static int usbhs_remove(struct platform_device *pdev)
return 0;
}
-static int usbhsc_suspend(struct device *dev)
+static __maybe_unused int usbhsc_suspend(struct device *dev)
{
struct usbhs_priv *priv = dev_get_drvdata(dev);
struct usbhs_mod *mod = usbhs_mod_get_current(priv);
@@ -857,7 +857,7 @@ static int usbhsc_suspend(struct device *dev)
return 0;
}
-static int usbhsc_resume(struct device *dev)
+static __maybe_unused int usbhsc_resume(struct device *dev)
{
struct usbhs_priv *priv = dev_get_drvdata(dev);
struct platform_device *pdev = usbhs_priv_to_pdev(priv);
--
2.20.0
next reply other threads:[~2018-12-11 10:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 10:06 Arnd Bergmann [this message]
2018-12-12 2:11 ` [PATCH] usb: renesas_usbhs: mark PM functions as __maybe_unused Yoshihiro Shimoda
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=20181211100645.650975-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=chris.brandt@renesas.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=horms+renesas@verge.net.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).