diff mbox series

[iproute2-next,08/20] bridge: vni: Remove print_vnifilter_rtm_filter()

Message ID 20231211140732.11475-9-bpoirier@nvidia.com (mailing list archive)
State Accepted
Commit 060eac10e764c46064aafaaed7d2808ea52858eb
Delegated to: Stephen Hemminger
Headers show
Series bridge: vni: UI fixes | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Benjamin Poirier Dec. 11, 2023, 2:07 p.m. UTC
print_vnifilter_rtm_filter() adds an unnecessary level of indirection so
remove it to simplify the code.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
---
 bridge/vni.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Stephen Hemminger Dec. 21, 2023, 4:05 a.m. UTC | #1
On Mon, 11 Dec 2023 09:07:20 -0500
Benjamin Poirier <bpoirier@nvidia.com> wrote:

> print_vnifilter_rtm_filter() adds an unnecessary level of indirection so
> remove it to simplify the code.
> 
> Reviewed-by: Petr Machata <petrm@nvidia.com>
> Tested-by: Petr Machata <petrm@nvidia.com>
> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
diff mbox series

Patch

diff --git a/bridge/vni.c b/bridge/vni.c
index 74668156..51e65b89 100644
--- a/bridge/vni.c
+++ b/bridge/vni.c
@@ -350,11 +350,6 @@  int print_vnifilter_rtm(struct nlmsghdr *n, void *arg)
 	return 0;
 }
 
-static int print_vnifilter_rtm_filter(struct nlmsghdr *n, void *arg)
-{
-	return print_vnifilter_rtm(n, arg);
-}
-
 static int vni_show(int argc, char **argv)
 {
 	char *filter_dev = NULL;
@@ -395,7 +390,7 @@  static int vni_show(int argc, char **argv)
 		printf("\n");
 	}
 
-	ret = rtnl_dump_filter(&rth, print_vnifilter_rtm_filter, NULL);
+	ret = rtnl_dump_filter(&rth, print_vnifilter_rtm, NULL);
 	if (ret < 0) {
 		fprintf(stderr, "Dump ternminated\n");
 		exit(1);