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]
Message-Id: <20170627153705.1378256-1-arnd@arndb.de>
Date:   Tue, 27 Jun 2017 17:36:36 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Olof Johansson <olof@...om.net>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        Lee Jones <lee.jones@...aro.org>,
        Jonathan Cameron <jic23@...nel.org>,
        Benson Leung <bleung@...omium.org>,
        Eric Caruso <ejcaruso@...omium.org>,
        Gwendal Grignou <gwendal@...omium.org>,
        Vincent Palatin <vpalatin@...omium.org>,
        Jeffery Yu <jefferyy@...dia.com>,
        Logan Gunthorpe <logang@...tatee.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] platform/chrome: cros_ec_lightbar - hide unused PM functions

The only reference to the new functions is inside of an #ifdef,
which now causes a harmless warning when CONFIG_PM_SLEEP is not set:

chrome/cros_ec_dev.c:478:12: error: 'ec_device_resume' defined but not used [-Werror=unused-function]
chrome/cros_ec_dev.c:469:12: error: 'ec_device_suspend' defined but not used [-Werror=unused-function]

This marks the two functions as __maybe_unused so they can get
silently dropped by the compiler.

Fixes: 405c84308c43 ("platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/platform/chrome/cros_ec_dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_dev.c b/drivers/platform/chrome/cros_ec_dev.c
index b9bf086f7569..cf6c4f0846b8 100644
--- a/drivers/platform/chrome/cros_ec_dev.c
+++ b/drivers/platform/chrome/cros_ec_dev.c
@@ -466,7 +466,7 @@ static const struct platform_device_id cros_ec_id[] = {
 };
 MODULE_DEVICE_TABLE(platform, cros_ec_id);
 
-static int ec_device_suspend(struct device *dev)
+static __maybe_unused int ec_device_suspend(struct device *dev)
 {
 	struct cros_ec_dev *ec = dev_get_drvdata(dev);
 
@@ -475,7 +475,7 @@ static int ec_device_suspend(struct device *dev)
 	return 0;
 }
 
-static int ec_device_resume(struct device *dev)
+static __maybe_unused int ec_device_resume(struct device *dev)
 {
 	struct cros_ec_dev *ec = dev_get_drvdata(dev);
 
-- 
2.9.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ