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>] [day] [month] [year] [list]
Message-Id: <20180731212405.27572-1-anders.roxell@linaro.org>
Date:   Tue, 31 Jul 2018 23:24:05 +0200
From:   Anders Roxell <anders.roxell@...aro.org>
To:     balbi@...nel.org, gregkh@...uxfoundation.org,
        enric.balletbo@...labora.com
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Anders Roxell <anders.roxell@...aro.org>
Subject: [PATCH] usb: dwc3: of-simple: mark PM functions as __maybe_unused

The suspend/resume functions are not referenced when power messagement
is enabled:
  CC      drivers/video/fbdev/matrox/matroxfb_DAC1064.o
drivers/usb/dwc3/dwc3-of-simple.c:223:12: warning: ‘dwc3_of_simple_resume’ defined but not used [-Wunused-function]
 static int dwc3_of_simple_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~
drivers/usb/dwc3/dwc3-of-simple.c:213:12: warning: ‘dwc3_of_simple_suspend’ defined but not used [-Wunused-function]
 static int dwc3_of_simple_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~~~
This marks them as __maybe_unused to let the compiler drop the function
without complaining.

Fixes: 76251db86561 ("usb: dwc3: of-simple: reset host controller at suspend/resume")
Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
---
 drivers/usb/dwc3/dwc3-of-simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index 40bf9e0bbc59..8f6d39463e99 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -210,7 +210,7 @@ static int dwc3_of_simple_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int dwc3_of_simple_suspend(struct device *dev)
+static int __maybe_unused dwc3_of_simple_suspend(struct device *dev)
 {
 	struct dwc3_of_simple *simple = dev_get_drvdata(dev);
 
@@ -220,7 +220,7 @@ static int dwc3_of_simple_suspend(struct device *dev)
 	return 0;
 }
 
-static int dwc3_of_simple_resume(struct device *dev)
+static int __maybe_unused dwc3_of_simple_resume(struct device *dev)
 {
 	struct dwc3_of_simple *simple = dev_get_drvdata(dev);
 
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ