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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160704131318.990672-1-arnd@arndb.de>
Date:	Mon,  4 Jul 2016 15:12:28 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Eduardo Valentin <edubezval@...il.com>
Cc:	Arnd Bergmann <arnd@...db.de>, Zhang Rui <rui.zhang@...el.com>,
	Rajendra Nayak <rnayak@...eaurora.org>,
	Lina Iyer <lina.iyer@...aro.org>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] thermal: qcom: tsens-8916: mark PM functions __maybe_unused

The newly added tsens-8916 driver produces warnings when CONFIG_PM
is disabled:

drivers/thermal/qcom/tsens.c:53:12: error: 'tsens_resume' defined but not used [-Werror=unused-function]
 static int tsens_resume(struct device *dev)
            ^~~~~~~~~~~~
drivers/thermal/qcom/tsens.c:43:12: error: 'tsens_suspend' defined but not used [-Werror=unused-function]
 static int tsens_suspend(struct device *dev)
            ^~~~~~~~~~~~~

This marks both functions __maybe_unused to let the compiler
know that they might be used in other configurations, without
adding ugly #ifdef logic.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/thermal/qcom/tsens.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 446f70b5dbb2..e4fca3350d26 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -40,7 +40,7 @@ static int tsens_get_trend(void *p, int trip, enum thermal_trend *trend)
 	return -ENOTSUPP;
 }
 
-static int tsens_suspend(struct device *dev)
+static int  __maybe_unused tsens_suspend(struct device *dev)
 {
 	struct tsens_device *tmdev = dev_get_drvdata(dev);
 
@@ -50,7 +50,7 @@ static int tsens_suspend(struct device *dev)
 	return 0;
 }
 
-static int tsens_resume(struct device *dev)
+static int __maybe_unused  tsens_resume(struct device *dev)
 {
 	struct tsens_device *tmdev = dev_get_drvdata(dev);
 
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ