From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH iproute2-next 5/7] tc/util: remove unused argument from print_tcstats2_attr
Date: Sat, 13 Apr 2024 15:04:06 -0700 [thread overview]
Message-ID: <20240413220516.7235-6-stephen@networkplumber.org> (raw)
In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org>
The function doesn't use the FILE handle.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
tc/m_action.c | 2 +-
tc/tc_util.c | 5 ++---
tc/tc_util.h | 3 +--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/tc/m_action.c b/tc/m_action.c
index 6a361f11..feb869a9 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -396,7 +396,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg, bool bind)
print_string(PRINT_FP, NULL, "\tAction statistics:", NULL);
print_nl();
open_json_object("stats");
- print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL);
+ print_tcstats2_attr(tb[TCA_ACT_STATS], "\t", NULL);
close_json_object();
print_nl();
}
diff --git a/tc/tc_util.c b/tc/tc_util.c
index 133fe9f9..f9151408 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -708,8 +708,7 @@ static void print_tcstats_basic_hw(struct rtattr **tbs, const char *prefix)
print_uint(PRINT_ANY, "hw_packets", " %u pkt", bs_hw.packets);
}
-void print_tcstats2_attr(FILE *fp, struct rtattr *rta,
- const char *prefix, struct rtattr **xstats)
+void print_tcstats2_attr(struct rtattr *rta, const char *prefix, struct rtattr **xstats)
{
struct rtattr *tbs[TCA_STATS_MAX + 1];
@@ -790,7 +789,7 @@ void print_tcstats_attr(FILE *fp, struct rtattr *tb[], const char *prefix,
struct rtattr **xstats)
{
if (tb[TCA_STATS2]) {
- print_tcstats2_attr(fp, tb[TCA_STATS2], prefix, xstats);
+ print_tcstats2_attr(tb[TCA_STATS2], prefix, xstats);
if (xstats && !*xstats)
goto compat_xstats;
return;
diff --git a/tc/tc_util.h b/tc/tc_util.h
index de908d5e..2d38dd58 100644
--- a/tc/tc_util.h
+++ b/tc/tc_util.h
@@ -91,8 +91,7 @@ char *sprint_linklayer(unsigned int linklayer, char *buf);
void print_tcstats_attr(FILE *fp, struct rtattr *tb[],
const char *prefix, struct rtattr **xstats);
-void print_tcstats2_attr(FILE *fp, struct rtattr *rta,
- const char *prefix, struct rtattr **xstats);
+void print_tcstats2_attr(struct rtattr *rta, const char *prefix, struct rtattr **xstats);
int get_tc_classid(__u32 *h, const char *str);
int print_tc_classid(char *buf, int len, __u32 h);
--
2.43.0
next prev parent reply other threads:[~2024-04-13 22:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-13 22:04 [PATCH iproute2-next 0/7] unused arguments Stephen Hemminger
2024-04-13 22:04 ` [PATCH iproute2-next 1/7] tc/u32: remove FILE argument Stephen Hemminger
2024-04-13 22:04 ` [PATCH iproute2-next 2/7] tc/util: remove unused argument from print_tm Stephen Hemminger
2024-04-13 22:04 ` [PATCH iproute2-next 3/7] tc/util: remove unused argument from print_action_control Stephen Hemminger
2024-04-13 22:04 ` [PATCH iproute2-next 4/7] tc/police: remove unused argument to tc_print_police Stephen Hemminger
2024-04-13 22:04 ` Stephen Hemminger [this message]
2024-04-13 22:04 ` [PATCH iproute2-next 6/7] tc/action: remove unused args from tc_print_action Stephen Hemminger
2024-04-13 22:04 ` [PATCH iproute2-next 7/7] tc/police: remove unused prototype police_print_xstats Stephen Hemminger
2024-04-21 1:51 ` [PATCH iproute2-next 0/7] unused arguments David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240413220516.7235-6-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).