Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1429878 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2016-06-23 16:20 +0200 |
| Last post | 2016-06-27 16:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] dsa: mv88e6xxx: hide unused functions Arnd Bergmann <arnd@arndb.de> - 2016-06-23 16:20 +0200
Re: [PATCH] dsa: mv88e6xxx: hide unused functions Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-23 17:30 +0200
Re: [PATCH] dsa: mv88e6xxx: hide unused functions David Miller <davem@davemloft.net> - 2016-06-27 16:50 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-06-23 16:20 +0200 |
| Subject | [PATCH] dsa: mv88e6xxx: hide unused functions |
| Message-ID | <rNdE5-2KN-13@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Date | 2016-06-23 17:30 +0200 |
| Message-ID | <rNeJQ-3uS-21@gated-at.bofh.it> |
| In reply to | #1429878 |
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
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-06-27 16:50 +0200 |
| Message-ID | <rOG1j-1yK-7@gated-at.bofh.it> |
| In reply to | #1429924 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web