Skip to contentSkip to conversation

clk: cs2000: mark resume function as __maybe_unused

PATCH Applied Arnd Bergmann 2 participants 2 messages Apr 9, 2018 – Apr 16, 2018 Common clk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: cs2000: mark resume function as __maybe_unused

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")
---
 drivers/clk/clk-cs2000-cp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-cs2000-cp.c +1 -1
index c58019750b7e..a2f8c42e527a 100644
@@ -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);
 
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw

Quoting Arnd Bergmann (2018-04-09 03:54:34)

Quoted 4 lines

When power management is disabled, we get a harmless warning:
=

drivers/clk/clk-cs2000-cp.c:544:12: error: 'cs2000_resume' defined but no=

t used [-Werror=3Dunused-function]

Quoted 7 lines

=

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

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

")

Quoted 2 lines

---

Applied to clk-fixes