* [PATCH] dsa: mv88e6xxx: hide unused functions
@ 2016-06-23 14:13 Arnd Bergmann
2016-06-23 15:21 ` Vivien Didelot
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-06-23 14:13 UTC (permalink / raw)
To: David S. Miller
Cc: Arnd Bergmann, Vivien Didelot, Andrew Lunn, Florian Fainelli,
netdev, linux-kernel
When CONFIG_NET_DSA_HWMON is disabled, we get warnings about two unused
functions whose only callers are all inside of an #ifdef:
drivers/net/dsa/mv88e6xxx.c:3257:12: 'mv88e6xxx_mdio_page_write' defined but not used [-Werror=unused-function]
drivers/net/dsa/mv88e6xxx.c:3244:12: 'mv88e6xxx_mdio_page_read' defined but not used [-Werror=unused-function]
This adds another ifdef around the function definitions. The warnings
appeared after the functions were marked 'static', but the problem
was already there before that.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues")
---
drivers/net/dsa/mv88e6xxx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index 9b116d8d4e23..2a95f2d6cf09 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -3241,6 +3241,7 @@ unlock:
return err;
}
+#ifdef CONFIG_NET_DSA_HWMON
static int mv88e6xxx_mdio_page_read(struct dsa_switch *ds, int port, int page,
int reg)
{
@@ -3266,6 +3267,7 @@ static int mv88e6xxx_mdio_page_write(struct dsa_switch *ds, int port, int page,
return ret;
}
+#endif
static int mv88e6xxx_port_to_mdio_addr(struct mv88e6xxx_priv_state *ps,
int port)
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dsa: mv88e6xxx: hide unused functions
2016-06-23 14:13 [PATCH] dsa: mv88e6xxx: hide unused functions Arnd Bergmann
@ 2016-06-23 15:21 ` Vivien Didelot
2016-06-27 14:43 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Vivien Didelot @ 2016-06-23 15:21 UTC (permalink / raw)
To: Arnd Bergmann, David S. Miller
Cc: Arnd Bergmann, Andrew Lunn, Florian Fainelli, netdev,
linux-kernel
Hi,
Arnd Bergmann <arnd@arndb.de> writes:
> When CONFIG_NET_DSA_HWMON is disabled, we get warnings about two unused
> functions whose only callers are all inside of an #ifdef:
>
> drivers/net/dsa/mv88e6xxx.c:3257:12: 'mv88e6xxx_mdio_page_write' defined but not used [-Werror=unused-function]
> drivers/net/dsa/mv88e6xxx.c:3244:12: 'mv88e6xxx_mdio_page_read' defined but not used [-Werror=unused-function]
>
> This adds another ifdef around the function definitions. The warnings
> appeared after the functions were marked 'static', but the problem
> was already there before that.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues")
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
David, this patch is meant for net-next. It applies cleanly *before* my
last two submissions:
1/2 http://patchwork.ozlabs.org/patch/638773/
2/2 http://patchwork.ozlabs.org/patch/638772/
Thanks,
Vivien
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dsa: mv88e6xxx: hide unused functions
2016-06-23 15:21 ` Vivien Didelot
@ 2016-06-27 14:43 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-27 14:43 UTC (permalink / raw)
To: vivien.didelot; +Cc: arnd, andrew, f.fainelli, netdev, linux-kernel
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Thu, 23 Jun 2016 11:21:27 -0400
> Hi,
>
> Arnd Bergmann <arnd@arndb.de> writes:
>
>> When CONFIG_NET_DSA_HWMON is disabled, we get warnings about two unused
>> functions whose only callers are all inside of an #ifdef:
>>
>> drivers/net/dsa/mv88e6xxx.c:3257:12: 'mv88e6xxx_mdio_page_write' defined but not used [-Werror=unused-function]
>> drivers/net/dsa/mv88e6xxx.c:3244:12: 'mv88e6xxx_mdio_page_read' defined but not used [-Werror=unused-function]
>>
>> This adds another ifdef around the function definitions. The warnings
>> appeared after the functions were marked 'static', but the problem
>> was already there before that.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: 57d3231057e9 ("net: dsa: mv88e6xxx: fix style issues")
>
> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
>
> David, this patch is meant for net-next. It applies cleanly *before* my
> last two submissions:
>
> 1/2 http://patchwork.ozlabs.org/patch/638773/
> 2/2 http://patchwork.ozlabs.org/patch/638772/
Oops, I applied those already.
Arnd, please respin if necessary.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-27 14:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-23 14:13 [PATCH] dsa: mv88e6xxx: hide unused functions Arnd Bergmann
2016-06-23 15:21 ` Vivien Didelot
2016-06-27 14:43 ` 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).