netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: vsc73xx: Make some functions static
@ 2018-07-05  8:59 Wei Yongjun
  2018-07-05 10:30 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2018-07-05  8:59 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Linus Walleij
  Cc: Wei Yongjun, netdev, kernel-janitors

Fixes the following sparse warnings:

drivers/net/dsa/vitesse-vsc73xx.c:1054:6: warning:
 symbol 'vsc73xx_get_strings' was not declared. Should it be static?
drivers/net/dsa/vitesse-vsc73xx.c:1113:5: warning:
 symbol 'vsc73xx_get_sset_count' was not declared. Should it be static?
drivers/net/dsa/vitesse-vsc73xx.c:1122:6: warning:
 symbol 'vsc73xx_get_ethtool_stats' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/dsa/vitesse-vsc73xx.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dsa/vitesse-vsc73xx.c b/drivers/net/dsa/vitesse-vsc73xx.c
index a4fc260..d4ea5cd 100644
--- a/drivers/net/dsa/vitesse-vsc73xx.c
+++ b/drivers/net/dsa/vitesse-vsc73xx.c
@@ -1051,8 +1051,8 @@ static void vsc73xx_port_disable(struct dsa_switch *ds, int port,
 	return NULL;
 }
 
-void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
-			 uint8_t *data)
+static void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
+				uint8_t *data)
 {
 	const struct vsc73xx_counter *cnt;
 	struct vsc73xx *vsc = ds->priv;
@@ -1110,7 +1110,7 @@ void vsc73xx_get_strings(struct dsa_switch *ds, int port, u32 stringset,
 	}
 }
 
-int vsc73xx_get_sset_count(struct dsa_switch *ds, int port, int sset)
+static int vsc73xx_get_sset_count(struct dsa_switch *ds, int port, int sset)
 {
 	/* We only support SS_STATS */
 	if (sset != ETH_SS_STATS)
@@ -1119,7 +1119,8 @@ int vsc73xx_get_sset_count(struct dsa_switch *ds, int port, int sset)
 	return 8;
 }
 
-void vsc73xx_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data)
+static void vsc73xx_get_ethtool_stats(struct dsa_switch *ds, int port,
+				      uint64_t *data)
 {
 	struct vsc73xx *vsc = ds->priv;
 	u8 regs[] = {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: dsa: vsc73xx: Make some functions static
  2018-07-05  8:59 [PATCH net-next] net: dsa: vsc73xx: Make some functions static Wei Yongjun
@ 2018-07-05 10:30 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-07-05 10:30 UTC (permalink / raw)
  To: weiyongjun1
  Cc: andrew, vivien.didelot, f.fainelli, linus.walleij, netdev,
	kernel-janitors

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Thu, 5 Jul 2018 08:59:09 +0000

> Fixes the following sparse warnings:
> 
> drivers/net/dsa/vitesse-vsc73xx.c:1054:6: warning:
>  symbol 'vsc73xx_get_strings' was not declared. Should it be static?
> drivers/net/dsa/vitesse-vsc73xx.c:1113:5: warning:
>  symbol 'vsc73xx_get_sset_count' was not declared. Should it be static?
> drivers/net/dsa/vitesse-vsc73xx.c:1122:6: warning:
>  symbol 'vsc73xx_get_ethtool_stats' was not declared. Should it be static?
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-05 10:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05  8:59 [PATCH net-next] net: dsa: vsc73xx: Make some functions static Wei Yongjun
2018-07-05 10:30 ` 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).