netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static
@ 2021-01-08 23:30 Vladimir Oltean
  2021-01-09  0:46 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Oltean @ 2021-01-08 23:30 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski
  Cc: netdev, Andrew Lunn, Florian Fainelli, Vivien Didelot

From: Vladimir Oltean <vladimir.oltean@nxp.com>

Introduced in commit 37b8da1a3c68 ("net: dsa: Move FDB add/del
implementation inside DSA") in net/dsa/legacy.c, these functions were
moved again to slave.c as part of commit 2a93c1a3651f ("net: dsa: Allow
compiling out legacy support"), before actually deleting net/dsa/slave.c
in 93e86b3bc842 ("net: dsa: Remove legacy probing support"). Along with
that movement there should have been a deletion of the prototypes from
dsa_priv.h, they are not useful.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/dsa/dsa_priv.h |  9 ---------
 net/dsa/slave.c    | 16 ++++++++--------
 2 files changed, 8 insertions(+), 17 deletions(-)

diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index 4f1bbaab72f2..3822520eeeae 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -110,15 +110,6 @@ void dsa_tag_driver_put(const struct dsa_device_ops *ops);
 bool dsa_schedule_work(struct work_struct *work);
 const char *dsa_tag_protocol_to_str(const struct dsa_device_ops *ops);
 
-int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
-		       struct net_device *dev,
-		       const unsigned char *addr, u16 vid,
-		       u16 flags,
-		       struct netlink_ext_ack *extack);
-int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
-		       struct net_device *dev,
-		       const unsigned char *addr, u16 vid);
-
 /* master.c */
 int dsa_master_setup(struct net_device *dev, struct dsa_port *cpu_dp);
 void dsa_master_teardown(struct net_device *dev);
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index c8b842ac2600..f8b6a69b6873 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1575,20 +1575,20 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
 };
 
 /* legacy way, bypassing the bridge *****************************************/
-int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
-		       struct net_device *dev,
-		       const unsigned char *addr, u16 vid,
-		       u16 flags,
-		       struct netlink_ext_ack *extack)
+static int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
+			      struct net_device *dev,
+			      const unsigned char *addr, u16 vid,
+			      u16 flags,
+			      struct netlink_ext_ack *extack)
 {
 	struct dsa_port *dp = dsa_slave_to_port(dev);
 
 	return dsa_port_fdb_add(dp, addr, vid);
 }
 
-int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
-		       struct net_device *dev,
-		       const unsigned char *addr, u16 vid)
+static int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
+			      struct net_device *dev,
+			      const unsigned char *addr, u16 vid)
 {
 	struct dsa_port *dp = dsa_slave_to_port(dev);
 
-- 
2.25.1


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

* Re: [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static
  2021-01-08 23:30 [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static Vladimir Oltean
@ 2021-01-09  0:46 ` Andrew Lunn
  2021-01-09  1:47 ` Florian Fainelli
  2021-01-10  2:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2021-01-09  0:46 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: David S . Miller, Jakub Kicinski, netdev, Florian Fainelli,
	Vivien Didelot

On Sat, Jan 09, 2021 at 01:30:54AM +0200, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> Introduced in commit 37b8da1a3c68 ("net: dsa: Move FDB add/del
> implementation inside DSA") in net/dsa/legacy.c, these functions were
> moved again to slave.c as part of commit 2a93c1a3651f ("net: dsa: Allow
> compiling out legacy support"), before actually deleting net/dsa/slave.c
> in 93e86b3bc842 ("net: dsa: Remove legacy probing support"). Along with
> that movement there should have been a deletion of the prototypes from
> dsa_priv.h, they are not useful.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static
  2021-01-08 23:30 [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static Vladimir Oltean
  2021-01-09  0:46 ` Andrew Lunn
@ 2021-01-09  1:47 ` Florian Fainelli
  2021-01-10  2:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2021-01-09  1:47 UTC (permalink / raw)
  To: Vladimir Oltean, David S . Miller, Jakub Kicinski
  Cc: netdev, Andrew Lunn, Vivien Didelot



On 1/8/2021 3:30 PM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> Introduced in commit 37b8da1a3c68 ("net: dsa: Move FDB add/del
> implementation inside DSA") in net/dsa/legacy.c, these functions were
> moved again to slave.c as part of commit 2a93c1a3651f ("net: dsa: Allow
> compiling out legacy support"), before actually deleting net/dsa/slave.c
> in 93e86b3bc842 ("net: dsa: Remove legacy probing support"). Along with
> that movement there should have been a deletion of the prototypes from
> dsa_priv.h, they are not useful.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

* Re: [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static
  2021-01-08 23:30 [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static Vladimir Oltean
  2021-01-09  0:46 ` Andrew Lunn
  2021-01-09  1:47 ` Florian Fainelli
@ 2021-01-10  2:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-10  2:10 UTC (permalink / raw)
  To: Vladimir Oltean; +Cc: davem, kuba, netdev, andrew, f.fainelli, vivien.didelot

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Sat,  9 Jan 2021 01:30:54 +0200 you wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> Introduced in commit 37b8da1a3c68 ("net: dsa: Move FDB add/del
> implementation inside DSA") in net/dsa/legacy.c, these functions were
> moved again to slave.c as part of commit 2a93c1a3651f ("net: dsa: Allow
> compiling out legacy support"), before actually deleting net/dsa/slave.c
> in 93e86b3bc842 ("net: dsa: Remove legacy probing support"). Along with
> that movement there should have been a deletion of the prototypes from
> dsa_priv.h, they are not useful.
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static
    https://git.kernel.org/netdev/net-next/c/4b9c935898dd

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-01-10  2:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 23:30 [PATCH net-next] net: dsa: dsa_legacy_fdb_{add,del} can be static Vladimir Oltean
2021-01-09  0:46 ` Andrew Lunn
2021-01-09  1:47 ` Florian Fainelli
2021-01-10  2:10 ` patchwork-bot+netdevbpf

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).