All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: cs2000: mark resume function as __maybe_unused
@ 2018-04-09 10:54 Arnd Bergmann
  2018-04-16 16:07   ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-04-09 10:54 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd
  Cc: Arnd Bergmann, Kuninori Morimoto, Nikita Yushchenko, Gaku Inami,
	linux-clk, linux-kernel

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(-)

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);
 
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: cs2000: mark resume function as __maybe_unused
  2018-04-09 10:54 [PATCH] clk: cs2000: mark resume function as __maybe_unused Arnd Bergmann
@ 2018-04-16 16:07   ` Stephen Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2018-04-16 16:07 UTC (permalink / raw)
  To: Arnd Bergmann, Michael Turquette
  Cc: Arnd Bergmann, Kuninori Morimoto, Nikita Yushchenko, Gaku Inami,
	linux-clk, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] clk: cs2000: mark resume function as __maybe_unused
@ 2018-04-16 16:07   ` Stephen Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2018-04-16 16:07 UTC (permalink / raw)
  To: Arnd Bergmann, Michael Turquette
  Cc: Arnd Bergmann, Kuninori Morimoto, Nikita Yushchenko, Gaku Inami,
	linux-clk, linux-kernel

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 no=
t used [-Werror=3Dunused-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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-16 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 10:54 [PATCH] clk: cs2000: mark resume function as __maybe_unused Arnd Bergmann
2018-04-16 16:07 ` Stephen Boyd
2018-04-16 16:07   ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.