OSDN Git Service

bridge: mcast: Constify 'group' argument in br_multicast_new_port_group()
authorIdo Schimmel <idosch@nvidia.com>
Tue, 6 Dec 2022 10:58:09 +0000 (12:58 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Dec 2022 04:05:52 +0000 (20:05 -0800)
The 'group' argument is not modified, so mark it as 'const'. It will
allow us to constify arguments of the callers of this function in future
patches.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/bridge/br_multicast.c
net/bridge/br_private.h

index 5e988f0..db4c390 100644 (file)
@@ -1273,7 +1273,7 @@ br_multicast_new_group_src(struct net_bridge_port_group *pg, struct br_ip *src_i
 
 struct net_bridge_port_group *br_multicast_new_port_group(
                        struct net_bridge_port *port,
-                       struct br_ip *group,
+                       const struct br_ip *group,
                        struct net_bridge_port_group __rcu *next,
                        unsigned char flags,
                        const unsigned char *src,
index 0a09f10..3997e16 100644 (file)
@@ -941,7 +941,8 @@ br_mdb_ip_get(struct net_bridge *br, struct br_ip *dst);
 struct net_bridge_mdb_entry *
 br_multicast_new_group(struct net_bridge *br, struct br_ip *group);
 struct net_bridge_port_group *
-br_multicast_new_port_group(struct net_bridge_port *port, struct br_ip *group,
+br_multicast_new_port_group(struct net_bridge_port *port,
+                           const struct br_ip *group,
                            struct net_bridge_port_group __rcu *next,
                            unsigned char flags, const unsigned char *src,
                            u8 filter_mode, u8 rt_protocol);