* [PATCH, net-next] qcom-emag: hide ACPI specific functions
@ 2018-05-25 21:37 Arnd Bergmann
2018-05-26 0:22 ` Timur Tabi
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2018-05-25 21:37 UTC (permalink / raw)
To: Timur Tabi, David S. Miller
Cc: Arnd Bergmann, Hemanth Puranik, netdev, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH, net-next] qcom-emag: hide ACPI specific functions
2018-05-25 21:37 [PATCH, net-next] qcom-emag: hide ACPI specific functions Arnd Bergmann
@ 2018-05-26 0:22 ` Timur Tabi
2018-05-27 1:30 ` Timur Tabi
0 siblings, 1 reply; 3+ messages in thread
From: Timur Tabi @ 2018-05-26 0:22 UTC (permalink / raw)
To: Arnd Bergmann, David S. Miller; +Cc: Hemanth Puranik, netdev, linux-kernel
On 5/25/18 4:37 PM, Arnd Bergmann wrote:
> +#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
This seems wrong. The SGMII interrupt handler should still be viable on
a device-tree system. There is a DT compatibility entry for the qdf2432.
Looks like that most recent patch on net-next broke DT support, when it
removed these lines:
- phy->open = emac_sgmii_open;
- phy->close = emac_sgmii_close;
- phy->link_up = emac_sgmii_link_up;
- phy->link_down = emac_sgmii_link_down;
I'll take it look at it next week when I'm back in the office.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH, net-next] qcom-emag: hide ACPI specific functions
2018-05-26 0:22 ` Timur Tabi
@ 2018-05-27 1:30 ` Timur Tabi
0 siblings, 0 replies; 3+ messages in thread
From: Timur Tabi @ 2018-05-27 1:30 UTC (permalink / raw)
To: Arnd Bergmann, David S. Miller; +Cc: Hemanth Puranik, netdev, linux-kernel
On 5/25/18 7:22 PM, Timur Tabi wrote:
> - phy->open = emac_sgmii_open;
> - phy->close = emac_sgmii_close;
> - phy->link_up = emac_sgmii_link_up;
> - phy->link_down = emac_sgmii_link_down;
>
> I'll take it look at it next week when I'm back in the office.
I posted a patch that fixes this problem and also retains device-tree
support.
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc. Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-27 1:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-25 21:37 [PATCH, net-next] qcom-emag: hide ACPI specific functions Arnd Bergmann
2018-05-26 0:22 ` Timur Tabi
2018-05-27 1:30 ` Timur Tabi
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).