From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
netdev@vger.kernel.org, sassmann@redhat.com,
anthony.l.nguyen@intel.com, sasha.neftin@intel.com,
vitaly.lifshits@intel.com, yu.c.chen@intel.com,
Hulk Robot <hulkci@huawei.com>
Subject: [PATCH net-next 5/5] e1000e: Mark e1000e_pm_prepare() as __maybe_unused
Date: Fri, 19 Mar 2021 14:17:23 -0700 [thread overview]
Message-ID: <20210319211723.1488244-6-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210319211723.1488244-1-anthony.l.nguyen@intel.com>
From: Wei Yongjun <weiyongjun1@huawei.com>
The function e1000e_pm_prepare() may have no callers depending
on configuration, so it must be marked __maybe_unused to avoid
harmless warning:
drivers/net/ethernet/intel/e1000e/netdev.c:6926:12:
warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function]
6926 | static int e1000e_pm_prepare(struct device *dev)
| ^~~~~~~~~~~~~~~~~
Fixes: ccf8b940e5fd ("e1000e: Leverage direct_complete to speed up s2ram")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 480f6712a3b6..39ca02b7fdc5 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6919,7 +6919,7 @@ static int __e1000_resume(struct pci_dev *pdev)
return 0;
}
-static int e1000e_pm_prepare(struct device *dev)
+static __maybe_unused int e1000e_pm_prepare(struct device *dev)
{
return pm_runtime_suspended(dev) &&
pm_suspend_via_firmware();
--
2.26.2
next prev parent reply other threads:[~2021-03-19 21:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 21:17 [PATCH net-next 0/5][pull request] 1GbE Intel Wired LAN Driver Updates 2021-03-19 Tony Nguyen
2021-03-19 21:17 ` [PATCH net-next 1/5] igc: Remove unused MII_CR_RESET Tony Nguyen
2021-03-19 21:17 ` [PATCH net-next 2/5] igc: Remove unused MII_CR_SPEED Tony Nguyen
2021-03-19 21:17 ` [PATCH net-next 3/5] igc: Remove unused MII_CR_LOOPBACK Tony Nguyen
2021-03-19 21:17 ` [PATCH net-next 4/5] igc: Assign boolean values to a bool variable Tony Nguyen
2021-03-19 21:17 ` Tony Nguyen [this message]
2021-03-19 21:40 ` [PATCH net-next 0/5][pull request] 1GbE Intel Wired LAN Driver Updates 2021-03-19 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210319211723.1488244-6-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=hulkci@huawei.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sasha.neftin@intel.com \
--cc=sassmann@redhat.com \
--cc=vitaly.lifshits@intel.com \
--cc=weiyongjun1@huawei.com \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).