* [Linux-kernel-mentees] [PATCH net-next] sun/niu: add __maybe_unused attribute to PM functions
@ 2020-07-07 7:41 Vaibhav Gupta
2020-07-07 19:57 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Vaibhav Gupta @ 2020-07-07 7:41 UTC (permalink / raw)
To: Bjorn Helgaas, Bjorn Helgaas, bjorn, Vaibhav Gupta,
David S. Miller, Jakub Kicinski, Stephen Rothwell
Cc: netdev, linux-kernel-mentees, linux-kernel, Vaibhav Gupta
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>
---
drivers/net/ethernet/sun/niu.c | 4 ++--
1 file 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);
--
2.27.0
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Linux-kernel-mentees] [PATCH net-next] sun/niu: add __maybe_unused attribute to PM functions
2020-07-07 7:41 [Linux-kernel-mentees] [PATCH net-next] sun/niu: add __maybe_unused attribute to PM functions Vaibhav Gupta
@ 2020-07-07 19:57 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-07 19:57 UTC (permalink / raw)
To: vaibhavgupta40
Cc: sfr, linux-kernel, helgaas, netdev, bhelgaas, kuba, linux-kernel-mentees
From: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Date: Tue, 7 Jul 2020 13:11:22 +0530
> 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>
Applied.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-07 19:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 7:41 [Linux-kernel-mentees] [PATCH net-next] sun/niu: add __maybe_unused attribute to PM functions Vaibhav Gupta
2020-07-07 19:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).