From: Arnd Bergmann <arnd@arndb.de>
To: Timur Tabi <timur@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>,
Hemanth Puranik <hpuranik@codeaurora.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH, net-next] qcom-emag: hide ACPI specific functions
Date: Fri, 25 May 2018 23:37:10 +0200 [thread overview]
Message-ID: <20180525213714.2120604-1-arnd@arndb.de> (raw)
A couple of functions in this file are only used when building with
ACPI enabled, leading to a build warning on most architectures:
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c:284:25: error: 'qdf2400_ops' defined but not used [-Werror=unused-variable]
static struct sgmii_ops qdf2400_ops = {
^~~~~~~~~~~
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c:276:25: error: 'qdf2432_ops' defined but not used [-Werror=unused-variable]
static struct sgmii_ops qdf2432_ops = {
This hides all the unused functions by putting them into the
corresponding #ifdef.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c b/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
index 562420b834df..01b80e0a5367 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
@@ -108,6 +108,7 @@ static void emac_sgmii_link_init(struct emac_adapter *adpt)
writel(val, phy->base + EMAC_SGMII_PHY_AUTONEG_CFG2);
}
+#ifdef CONFIG_ACPI
static int emac_sgmii_irq_clear(struct emac_adapter *adpt, u8 irq_bits)
{
struct emac_sgmii *phy = &adpt->phy;
@@ -288,6 +289,7 @@ static struct sgmii_ops qdf2400_ops = {
.link_change = emac_sgmii_common_link_change,
.reset = emac_sgmii_common_reset,
};
+#endif
static int emac_sgmii_acpi_match(struct device *dev, void *data)
{
--
2.9.0
next reply other threads:[~2018-05-25 21:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 21:37 Arnd Bergmann [this message]
2018-05-26 0:22 ` Timur Tabi
2018-05-27 1:30 ` Timur Tabi
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=20180525213714.2120604-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=hpuranik@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=timur@codeaurora.org \
/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
all inboxes | Powered by JetHome®