Skip to contentSkip to conversation

bridge: Remove unused function argument

PATCH Applied Benjamin Poirier 2 participants 2 messages Nov 15, 2022 – Nov 17, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge: Remove unused function argument

print_vnifilter_rtm() was probably modeled on print_vlan_rtm() but the 'monitor' argument is unused in the vnifilter case.

---
 bridge/br_common.h | 2 +-
 bridge/monitor.c   | 2 +-
 bridge/vni.c       | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
bridge/br_common.h +1 -1
index da677df8..1bdee658 100644
@@ -14,7 +14,7 @@ void print_stp_state(__u8 state);
 int parse_stp_state(const char *arg);
 int print_vlan_rtm(struct nlmsghdr *n, void *arg, bool monitor,
 		   bool global_only);
-int print_vnifilter_rtm(struct nlmsghdr *n, void *arg, bool monitor);
+int print_vnifilter_rtm(struct nlmsghdr *n, void *arg);
 void br_print_router_port_stats(struct rtattr *pattr);
 void print_headers(FILE *fp, const char *label);
 
bridge/monitor.c +1 -1
index e321516a..d82f45cc 100644
@@ -63,7 +63,7 @@ static int accept_msg(struct rtnl_ctrl_data *ctrl,
 
 	case RTM_NEWTUNNEL:
 	case RTM_DELTUNNEL:
-		return print_vnifilter_rtm(n, arg, true);
+		return print_vnifilter_rtm(n, arg);
 
 	default:
 		return 0;
bridge/vni.c +2 -2
index e776797a..940f251c 100644
@@ -303,7 +303,7 @@ static void print_vni(struct rtattr *t, int ifindex)
 	print_string(PRINT_FP, NULL, "%s", _SL_);
 }
 
-int print_vnifilter_rtm(struct nlmsghdr *n, void *arg, bool monitor)
+int print_vnifilter_rtm(struct nlmsghdr *n, void *arg)
 {
 	struct tunnel_msg *tmsg = NLMSG_DATA(n);
 	int len = n->nlmsg_len;
@@ -364,7 +364,7 @@ int print_vnifilter_rtm(struct nlmsghdr *n, void *arg, bool monitor)
 
 static int print_vnifilter_rtm_filter(struct nlmsghdr *n, void *arg)
 {
-	return print_vnifilter_rtm(n, arg, false);
+	return print_vnifilter_rtm(n, arg);
 }
 
 static int vni_show(int argc, char **argv)
Signature · 1 line
2.37.2
#1 lore raw
This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <[email protected]>:

Quoted 10 lines · On Tue, 15 Nov 2022 16:07:15 -0500 you wrote:

print_vnifilter_rtm() was probably modeled on print_vlan_rtm() but the 'monitor' argument is unused in the vnifilter case.

---
 bridge/br_common.h | 2 +-
 bridge/monitor.c   | 2 +-
 bridge/vni.c       | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Here is the summary with links:
- [iproute2-next] bridge: Remove unused function argument

    https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=2ed09c3bf8ac

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html