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:	Sat, 16 Apr 2016 22:19:33 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Eduardo Valentin <edubezval@...il.com>, Wei Ni <wni@...dia.com>
Cc:	Arnd Bergmann <arnd@...db.de>, Zhang Rui <rui.zhang@...el.com>,
	Stephen Warren <swarren@...dotorg.org>,
	Thierry Reding <thierry.reding@...il.com>,
	Alexandre Courbot <gnurou@...il.com>, linux-pm@...r.kernel.org,
	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] thermal: tegra: mark PM functions __maybe_unused

After the PM support has been added to this driver, we get
a harmless warning when that support is disabled at compile
time:

drivers/thermal/tegra/soctherm.c:641:12: error: 'soctherm_resume' defined but not used [-Werror=unused-function]
 static int soctherm_resume(struct device *dev)

This marks the two PM functions as __maybe_unused to shut up
the warning. This is preferred over adding an #ifdef around
them, as it is harder to get wrong, and provides better
compile-time coverage.

Signed-off-by: Arnd Bergmann <arnd@...db.de>
Fixes: a134b4143b65 ("thermal: tegra: add PM support")
---
 drivers/thermal/tegra/soctherm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index 559c74279eb8..be829d6e131c 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -629,7 +629,7 @@ static int tegra_soctherm_remove(struct platform_device *pdev)
 	return 0;
 }
 
-static int soctherm_suspend(struct device *dev)
+static int __maybe_unused soctherm_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 
@@ -638,7 +638,7 @@ static int soctherm_suspend(struct device *dev)
 	return 0;
 }
 
-static int soctherm_resume(struct device *dev)
+static int __maybe_unused soctherm_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct tegra_soctherm *tegra = platform_get_drvdata(pdev);
-- 
2.7.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ