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  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:   Sun,  3 Jan 2021 15:04:21 +0100
From:   Arnd Bergmann <>
To:     Maximilian Luz <>,
        Hans de Goede <>,
        Mark Gross <>
Cc:     Arnd Bergmann <>,,
Subject: [PATCH] platform/surface: mark PM functions as __maybe_unused

From: Arnd Bergmann <>

When CONFIG_PM is disabled, the compiler produces harmless warnings:

drivers/platform/surface/surface_gpe.c:184:12: error: unused function 'surface_gpe_suspend' [-Werror,-Wunused-function]
static int surface_gpe_suspend(struct device *dev)
drivers/platform/surface/surface_gpe.c:189:12: error: unused function 'surface_gpe_resume' [-Werror,-Wunused-function]
static int surface_gpe_resume(struct device *dev)

Mark these as __maybe_unused to shut up the warning.

Fixes: 274335f1c557 ("platform/surface: Add Driver to set up lid GPEs on MS Surface device")
Signed-off-by: Arnd Bergmann <>
 drivers/platform/surface/surface_gpe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/surface/surface_gpe.c b/drivers/platform/surface/surface_gpe.c
index e49e5d6d5d4e..86f6991b1215 100644
--- a/drivers/platform/surface/surface_gpe.c
+++ b/drivers/platform/surface/surface_gpe.c
@@ -181,12 +181,12 @@ static int surface_lid_enable_wakeup(struct device *dev, bool enable)
 	return 0;
-static int surface_gpe_suspend(struct device *dev)
+static int __maybe_unused surface_gpe_suspend(struct device *dev)
 	return surface_lid_enable_wakeup(dev, true);
-static int surface_gpe_resume(struct device *dev)
+static int __maybe_unused surface_gpe_resume(struct device *dev)
 	return surface_lid_enable_wakeup(dev, false);

Powered by blists - more mailing lists