summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaibhav Gupta <vaibhavgupta40@gmail.com>2020-07-07 09:41:22 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-07 21:56:40 +0200
commit86fc3f7074d029ce23271d492a1c8ffee3067244 (patch)
tree559d4ad10fe46e50a444dcb155f31d00361940b1
parentMerge branch 'phy-warn' (diff)
downloadlinux-86fc3f7074d029ce23271d492a1c8ffee3067244.tar.xz
linux-86fc3f7074d029ce23271d492a1c8ffee3067244.zip
sun/niu: add __maybe_unused attribute to PM functions
The upgraded .suspend() and .resume() throw "defined but not used [-Wunused-function]" warning for certain configurations. Mark them with "__maybe_unused" attribute. Compile-tested only. Fixes: b0db0cc2f695 ("sun/niu: use generic power management") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/sun/niu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 68541c823245..b4e20d15d138 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -9873,7 +9873,7 @@ static void niu_pci_remove_one(struct pci_dev *pdev)
}
}
-static int niu_suspend(struct device *dev_d)
+static int __maybe_unused niu_suspend(struct device *dev_d)
{
struct net_device *dev = dev_get_drvdata(dev_d);
struct niu *np = netdev_priv(dev);
@@ -9900,7 +9900,7 @@ static int niu_suspend(struct device *dev_d)
return 0;
}
-static int niu_resume(struct device *dev_d)
+static int __maybe_unused niu_resume(struct device *dev_d)
{
struct net_device *dev = dev_get_drvdata(dev_d);
struct niu *np = netdev_priv(dev);