diff options
author | Michal Kubecek <mkubecek@suse.cz> | 2020-08-03 13:57:09 +0200 |
---|---|---|
committer | Michal Kubecek <mkubecek@suse.cz> | 2020-08-04 14:15:28 +0200 |
commit | 655f8fb6e2523b38ae50f88b2843e6f9f8a24e26 (patch) | |
tree | 14c64a8bbaeb7076ce581aee757e306cebcfd5cd | |
parent | b131eba4803d29bc866426029541b9c00c223296 (diff) | |
download | ethtool-655f8fb6e2523b38ae50f88b2843e6f9f8a24e26.tar.gz |
cable_test: clean up unused parameters
Functions nl_cable_test_ntf_attr() and nl_cable_test_tdr_ntf_attr() do not
use nlctx parameter and as they are not callbacks with fixed signature, we
can simply drop it. Once we do, the same is true for cable_test_ntf_nest()
and cable_test_tdr_ntf_nest().
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
-rw-r--r-- | netlink/cable_test.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/netlink/cable_test.c b/netlink/cable_test.c index c2b9c97..d39b7d8 100644 --- a/netlink/cable_test.c +++ b/netlink/cable_test.c @@ -88,8 +88,7 @@ static char *nl_pair2txt(uint8_t pair) } } -static int nl_cable_test_ntf_attr(struct nlattr *evattr, - struct nl_context *nlctx) +static int nl_cable_test_ntf_attr(struct nlattr *evattr) { unsigned int cm; uint16_t code; @@ -122,14 +121,13 @@ static int nl_cable_test_ntf_attr(struct nlattr *evattr, return 0; } -static void cable_test_ntf_nest(const struct nlattr *nest, - struct nl_context *nlctx) +static void cable_test_ntf_nest(const struct nlattr *nest) { struct nlattr *pos; int ret; mnl_attr_for_each_nested(pos, nest) { - ret = nl_cable_test_ntf_attr(pos, nlctx); + ret = nl_cable_test_ntf_attr(pos); if (ret < 0) return; } @@ -180,7 +178,7 @@ static int cable_test_ntf_stop_cb(const struct nlmsghdr *nlhdr, void *data) } if (tb[ETHTOOL_A_CABLE_TEST_NTF_NEST]) - cable_test_ntf_nest(tb[ETHTOOL_A_CABLE_TEST_NTF_NEST], nlctx); + cable_test_ntf_nest(tb[ETHTOOL_A_CABLE_TEST_NTF_NEST]); if (status == ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED) { if (ctctx) @@ -339,8 +337,7 @@ static int nl_get_cable_test_tdr_step(const struct nlattr *nest, return 0; } -static int nl_cable_test_tdr_ntf_attr(struct nlattr *evattr, - struct nl_context *nlctx) +static int nl_cable_test_tdr_ntf_attr(struct nlattr *evattr) { uint32_t first, last, step; uint8_t pair; @@ -391,14 +388,13 @@ static int nl_cable_test_tdr_ntf_attr(struct nlattr *evattr, return 0; } -static void cable_test_tdr_ntf_nest(const struct nlattr *nest, - struct nl_context *nlctx) +static void cable_test_tdr_ntf_nest(const struct nlattr *nest) { struct nlattr *pos; int ret; mnl_attr_for_each_nested(pos, nest) { - ret = nl_cable_test_tdr_ntf_attr(pos, nlctx); + ret = nl_cable_test_tdr_ntf_attr(pos); if (ret < 0) return; } @@ -450,8 +446,7 @@ int cable_test_tdr_ntf_stop_cb(const struct nlmsghdr *nlhdr, void *data) } if (tb[ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST]) - cable_test_tdr_ntf_nest(tb[ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST], - nlctx); + cable_test_tdr_ntf_nest(tb[ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST]); if (status == ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED) { if (ctctx) |