summaryrefslogtreecommitdiff
path: root/net/bridge/br_fdb.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-06-27 14:54:26 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-28 14:09:03 -0700
commitbdf123b455ce596aec6e410ec36fe3687b6a2140 (patch)
treee7e538c2033ec30c4a2cc7b636da7fc06a12b92e /net/bridge/br_fdb.c
parent0d2cfbd41c4a5a0ca5598d1874b1081138cd64c6 (diff)
net: bridge: constify variables in the replay helpers
Some of the arguments and local variables for the newly added switchdev replay helpers can be const, so let's make them so. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r--net/bridge/br_fdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 9d164a518e38..2e777c8b0921 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -727,7 +727,7 @@ static inline size_t fdb_nlmsg_size(void)
}
static int br_fdb_replay_one(struct notifier_block *nb,
- struct net_bridge_fdb_entry *fdb,
+ const struct net_bridge_fdb_entry *fdb,
struct net_device *dev, const void *ctx)
{
struct switchdev_notifier_fdb_info item;
@@ -745,7 +745,7 @@ static int br_fdb_replay_one(struct notifier_block *nb,
return notifier_to_errno(err);
}
-int br_fdb_replay(struct net_device *br_dev, struct net_device *dev,
+int br_fdb_replay(const struct net_device *br_dev, const struct net_device *dev,
const void *ctx, struct notifier_block *nb)
{
struct net_bridge_fdb_entry *fdb;
@@ -760,7 +760,7 @@ int br_fdb_replay(struct net_device *br_dev, struct net_device *dev,
rcu_read_lock();
hlist_for_each_entry_rcu(fdb, &br->fdb_list, fdb_node) {
- struct net_bridge_port *dst = READ_ONCE(fdb->dst);
+ const struct net_bridge_port *dst = READ_ONCE(fdb->dst);
struct net_device *dst_dev;
dst_dev = dst ? dst->dev : br->dev;