From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3339C433DF for ; Mon, 3 Aug 2020 11:57:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1AE2207DF for ; Mon, 3 Aug 2020 11:57:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726688AbgHCL5R (ORCPT ); Mon, 3 Aug 2020 07:57:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:41774 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgHCL5L (ORCPT ); Mon, 3 Aug 2020 07:57:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 089D5ABF1 for ; Mon, 3 Aug 2020 11:57:25 +0000 (UTC) Received: by lion.mk-sys.cz (Postfix, from userid 1000) id B2F9A60754; Mon, 3 Aug 2020 13:57:09 +0200 (CEST) Message-Id: <4e6a60bf95b819912eb08cb13276791d8ec9feac.1596451857.git.mkubecek@suse.cz> In-Reply-To: References: From: Michal Kubecek Subject: [PATCH ethtool 2/7] cable_test: clean up unused parameters To: netdev@vger.kernel.org Date: Mon, 3 Aug 2020 13:57:09 +0200 (CEST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- netlink/cable_test.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/netlink/cable_test.c b/netlink/cable_test.c index c2b9c97d1239..d39b7d82efb0 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) -- 2.28.0