lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Dec 2018 11:19:24 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <gregkh@...uxfoundation.org>, <yoshihiro.shimoda.uh@...esas.com>,
        <felipe.balbi@...ux.intel.com>, <horms+renesas@...ge.net.au>,
        <fengguang.wu@...el.com>
CC:     <linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next] usb: renesas_usbhs: Fix unused function warning when CONFIG_PM not set

with CONFIG_PM not set, gcc warning this:
drivers/usb/renesas_usbhs/common.c:844:12:
 warning: 'usbhsc_suspend' defined but not used [-Wunused-function]
drivers/usb/renesas_usbhs/common.c:860:12:
 warning: 'usbhsc_resume' defined but not used [-Wunused-function]

fix this by adding #ifdef around it.

Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 drivers/usb/renesas_usbhs/common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
index 02c1d2b..9390c76 100644
--- a/drivers/usb/renesas_usbhs/common.c
+++ b/drivers/usb/renesas_usbhs/common.c
@@ -841,6 +841,7 @@ static int usbhs_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_PM
 static int usbhsc_suspend(struct device *dev)
 {
 	struct usbhs_priv *priv = dev_get_drvdata(dev);
@@ -873,6 +874,7 @@ static int usbhsc_resume(struct device *dev)
 
 	return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(usbhsc_pm_ops, usbhsc_suspend, usbhsc_resume);
 
-- 
2.7.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ