[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181211100645.650975-1-arnd@arndb.de>
Date: Tue, 11 Dec 2018 11:06:25 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Simon Horman <horms+renesas@...ge.net.au>,
Chris Brandt <chris.brandt@...esas.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] usb: renesas_usbhs: mark PM functions as __maybe_unused
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@...db.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
Powered by blists - more mailing lists