]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: dsa_legacy_fdb_{add,del} can be static
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 8 Jan 2021 23:30:54 +0000 (01:30 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 Jan 2021 02:05:52 +0000 (18:05 -0800)
Introduced in commit 2ef4236cffea ("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 5ac990e47c62 ("net: dsa: Allow
compiling out legacy support"), before actually deleting net/dsa/slave.c
in 0820904404b2 ("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>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210108233054.1222278-1-olteanv@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/dsa_priv.h
net/dsa/slave.c

index 4f1bbaab72f27acea6fb2b41a1b5e80e1d653d48..3822520eeeae9322fa2de13cf7b4f86607e8d4a3 100644 (file)
@@ -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);
index c8b842ac2600bfcba6ee0c0de93233ea389e22f6..f8b6a69b6873c55612f7fa45f1f32696ec933f6c 100644 (file)
@@ -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);