diff mbox series

clk: cs2000: mark resume function as __maybe_unused

Message ID 20180409105438.2402477-1-arnd@arndb.de
State Accepted
Commit a21b85944c9653f2a3388d0da962c7c70690c30f
Headers show
Series clk: cs2000: mark resume function as __maybe_unused | expand

Commit Message

Arnd Bergmann April 9, 2018, 10:54 a.m. UTC
When power management is disabled, we get a harmless warning:

drivers/clk/clk-cs2000-cp.c:544:12: error: 'cs2000_resume' defined but not used [-Werror=unused-function]

Marking the function as __maybe_unused lets the compiler silently
drop it instead.

Fixes: eade4ccdb087 ("clk: cs2000: set pm_ops in hibernate-compatible way")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/clk/clk-cs2000-cp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.0

Comments

Stephen Boyd April 16, 2018, 4:07 p.m. UTC | #1
Quoting Arnd Bergmann (2018-04-09 03:54:34)
> When power management is disabled, we get a harmless warning:

> 

> drivers/clk/clk-cs2000-cp.c:544:12: error: 'cs2000_resume' defined but not used [-Werror=unused-function]

> 

> Marking the function as __maybe_unused lets the compiler silently

> drop it instead.

> 

> Fixes: eade4ccdb087 ("clk: cs2000: set pm_ops in hibernate-compatible way")

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---


Applied to clk-fixes
diff mbox series

Patch

diff --git a/drivers/clk/clk-cs2000-cp.c b/drivers/clk/clk-cs2000-cp.c
index c58019750b7e..a2f8c42e527a 100644
--- a/drivers/clk/clk-cs2000-cp.c
+++ b/drivers/clk/clk-cs2000-cp.c
@@ -541,7 +541,7 @@  static int cs2000_probe(struct i2c_client *client,
 	return ret;
 }
 
-static int cs2000_resume(struct device *dev)
+static int __maybe_unused cs2000_resume(struct device *dev)
 {
 	struct cs2000_priv *priv = dev_get_drvdata(dev);