Skip to contentSkip to conversation

sun/cassini: mark cas_resume() as __maybe_unused

PATCH Applied Wei Yongjun 2 participants 2 messages Jul 7, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sun/cassini: mark cas_resume() as __maybe_unused

In certain configurations without power management support, gcc report the following warning:

drivers/net/ethernet/sun/cassini.c:5206:12: warning:
'cas_resume' defined but not used [-Wunused-function] 5206 | static int cas_resume(struct device *dev_d)

      |            ^~~~~~~~~~

Mark cas_resume() as __maybe_unused to make it clear.

Fixes f193f4ebde3d ("sun/cassini: use generic power management")
---
 drivers/net/ethernet/sun/cassini.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sun/cassini.c +1 -1
index 95c07cc84053..e04c3d73a246 100644
@@ -5203,7 +5203,7 @@ static int __maybe_unused cas_suspend(struct device *dev_d)
 	return 0;
 }
 
-static int cas_resume(struct device *dev_d)
+static int __maybe_unused cas_resume(struct device *dev_d)
 {
 	struct net_device *dev = dev_get_drvdata(dev_d);
 	struct cas *cp = netdev_priv(dev);
maintainer Applied
#1 lore raw

From: Wei Yongjun <[email protected]>
Date: Tue, 7 Jul 2020 18:55:43 +0800

Quoted 6 lines

In certain configurations without power management support, gcc report the following warning:

drivers/net/ethernet/sun/cassini.c:5206:12: warning:
'cas_resume' defined but not used [-Wunused-function] 5206 | static int cas_resume(struct device *dev_d)

Quoted 7 lines
      |            ^~~~~~~~~~

Mark cas_resume() as __maybe_unused to make it clear.

Fixes f193f4ebde3d ("sun/cassini: use generic power management")

Applied, thanks.