Skip to content

Commit 4b9c935

Browse files
vladimirolteankuba-moo
authored andcommitted
net: dsa: dsa_legacy_fdb_{add,del} can be static
Introduced in commit 37b8da1 ("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 2a93c1a ("net: dsa: Allow compiling out legacy support"), before actually deleting net/dsa/slave.c in 93e86b3 ("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 <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 430cc48 commit 4b9c935

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

net/dsa/dsa_priv.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ void dsa_tag_driver_put(const struct dsa_device_ops *ops);
110110
bool dsa_schedule_work(struct work_struct *work);
111111
const char *dsa_tag_protocol_to_str(const struct dsa_device_ops *ops);
112112

113-
int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
114-
struct net_device *dev,
115-
const unsigned char *addr, u16 vid,
116-
u16 flags,
117-
struct netlink_ext_ack *extack);
118-
int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
119-
struct net_device *dev,
120-
const unsigned char *addr, u16 vid);
121-
122113
/* master.c */
123114
int dsa_master_setup(struct net_device *dev, struct dsa_port *cpu_dp);
124115
void dsa_master_teardown(struct net_device *dev);

net/dsa/slave.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,20 +1575,20 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
15751575
};
15761576

15771577
/* legacy way, bypassing the bridge *****************************************/
1578-
int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
1579-
struct net_device *dev,
1580-
const unsigned char *addr, u16 vid,
1581-
u16 flags,
1582-
struct netlink_ext_ack *extack)
1578+
static int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
1579+
struct net_device *dev,
1580+
const unsigned char *addr, u16 vid,
1581+
u16 flags,
1582+
struct netlink_ext_ack *extack)
15831583
{
15841584
struct dsa_port *dp = dsa_slave_to_port(dev);
15851585

15861586
return dsa_port_fdb_add(dp, addr, vid);
15871587
}
15881588

1589-
int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
1590-
struct net_device *dev,
1591-
const unsigned char *addr, u16 vid)
1589+
static int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
1590+
struct net_device *dev,
1591+
const unsigned char *addr, u16 vid)
15921592
{
15931593
struct dsa_port *dp = dsa_slave_to_port(dev);
15941594

0 commit comments

Comments
 (0)