From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH iproute2-next 4/7] tc/police: remove unused argument to tc_print_police
Date: Sat, 13 Apr 2024 15:04:05 -0700 [thread overview]
Message-ID: <20240413220516.7235-5-stephen@networkplumber.org> (raw)
In-Reply-To: <20240413220516.7235-1-stephen@networkplumber.org>
FILE handle no longer used.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
tc/f_basic.c | 2 +-
tc/f_bpf.c | 2 +-
tc/f_cgroup.c | 2 +-
tc/f_flow.c | 2 +-
tc/f_fw.c | 2 +-
tc/f_route.c | 2 +-
tc/f_u32.c | 2 +-
tc/m_police.c | 6 +++---
tc/tc_util.h | 2 +-
9 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/tc/f_basic.c b/tc/f_basic.c
index 1ceb15d4..6b36028f 100644
--- a/tc/f_basic.c
+++ b/tc/f_basic.c
@@ -130,7 +130,7 @@ static int basic_print_opt(struct filter_util *qu, FILE *f,
if (tb[TCA_BASIC_POLICE]) {
print_nl();
- tc_print_police(f, tb[TCA_BASIC_POLICE]);
+ tc_print_police(tb[TCA_BASIC_POLICE]);
}
if (tb[TCA_BASIC_ACT]) {
diff --git a/tc/f_bpf.c b/tc/f_bpf.c
index a6d4875f..f265249d 100644
--- a/tc/f_bpf.c
+++ b/tc/f_bpf.c
@@ -250,7 +250,7 @@ static int bpf_print_opt(struct filter_util *qu, FILE *f,
if (tb[TCA_BPF_POLICE]) {
print_nl();
- tc_print_police(f, tb[TCA_BPF_POLICE]);
+ tc_print_police(tb[TCA_BPF_POLICE]);
}
if (tb[TCA_BPF_ACT])
diff --git a/tc/f_cgroup.c b/tc/f_cgroup.c
index 291d6e7e..d4201b91 100644
--- a/tc/f_cgroup.c
+++ b/tc/f_cgroup.c
@@ -93,7 +93,7 @@ static int cgroup_print_opt(struct filter_util *qu, FILE *f,
if (tb[TCA_CGROUP_POLICE]) {
print_nl();
- tc_print_police(f, tb[TCA_CGROUP_POLICE]);
+ tc_print_police(tb[TCA_CGROUP_POLICE]);
}
if (tb[TCA_CGROUP_ACT])
diff --git a/tc/f_flow.c b/tc/f_flow.c
index 4a29af22..07340f2a 100644
--- a/tc/f_flow.c
+++ b/tc/f_flow.c
@@ -347,7 +347,7 @@ static int flow_print_opt(struct filter_util *fu, FILE *f, struct rtattr *opt,
if (tb[TCA_FLOW_EMATCHES])
print_ematch(f, tb[TCA_FLOW_EMATCHES]);
if (tb[TCA_FLOW_POLICE])
- tc_print_police(f, tb[TCA_FLOW_POLICE]);
+ tc_print_police(tb[TCA_FLOW_POLICE]);
if (tb[TCA_FLOW_ACT]) {
print_nl();
tc_print_action(f, tb[TCA_FLOW_ACT], 0);
diff --git a/tc/f_fw.c b/tc/f_fw.c
index 5e72e526..190f79fc 100644
--- a/tc/f_fw.c
+++ b/tc/f_fw.c
@@ -146,7 +146,7 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u
}
if (tb[TCA_FW_POLICE])
- tc_print_police(f, tb[TCA_FW_POLICE]);
+ tc_print_police(tb[TCA_FW_POLICE]);
if (tb[TCA_FW_INDEV]) {
struct rtattr *idev = tb[TCA_FW_INDEV];
diff --git a/tc/f_route.c b/tc/f_route.c
index ca8a8ddd..3b6f5c2f 100644
--- a/tc/f_route.c
+++ b/tc/f_route.c
@@ -165,7 +165,7 @@ static int route_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt,
print_color_string(PRINT_ANY, COLOR_IFNAME, "fromif", "fromif %s",
ll_index_to_name(rta_getattr_u32(tb[TCA_ROUTE4_IIF])));
if (tb[TCA_ROUTE4_POLICE])
- tc_print_police(f, tb[TCA_ROUTE4_POLICE]);
+ tc_print_police(tb[TCA_ROUTE4_POLICE]);
if (tb[TCA_ROUTE4_ACT])
tc_print_action(f, tb[TCA_ROUTE4_ACT], 0);
return 0;
diff --git a/tc/f_u32.c b/tc/f_u32.c
index f8e1ff6e..c04ec02d 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -1365,7 +1365,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt,
if (tb[TCA_U32_POLICE]) {
print_nl();
- tc_print_police(f, tb[TCA_U32_POLICE]);
+ tc_print_police(tb[TCA_U32_POLICE]);
}
if (tb[TCA_U32_INDEV]) {
diff --git a/tc/m_police.c b/tc/m_police.c
index 02e50142..d7a396a2 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -260,7 +260,7 @@ int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n)
return act_parse_police(NULL, argc_p, argv_p, tca_id, n);
}
-static int print_police(struct action_util *a, FILE *f, struct rtattr *arg)
+static int print_police(struct action_util *a, FILE *funused, struct rtattr *arg)
{
SPRINT_BUF(b2);
struct tc_police *p;
@@ -356,7 +356,7 @@ static int print_police(struct action_util *a, FILE *f, struct rtattr *arg)
return 0;
}
-int tc_print_police(FILE *f, struct rtattr *arg)
+int tc_print_police(struct rtattr *arg)
{
- return print_police(&police_action_util, f, arg);
+ return print_police(&police_action_util, NULL, arg);
}
diff --git a/tc/tc_util.h b/tc/tc_util.h
index 851c2092..de908d5e 100644
--- a/tc/tc_util.h
+++ b/tc/tc_util.h
@@ -98,7 +98,7 @@ int get_tc_classid(__u32 *h, const char *str);
int print_tc_classid(char *buf, int len, __u32 h);
char *sprint_tc_classid(__u32 h, char *buf);
-int tc_print_police(FILE *f, struct rtattr *tb);
+int tc_print_police(struct rtattr *tb);
int parse_percent(double *val, const char *str);
int parse_police(int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n);
--
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 ` Stephen Hemminger [this message]
2024-04-13 22:04 ` [PATCH iproute2-next 5/7] tc/util: remove unused argument from print_tcstats2_attr Stephen Hemminger
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-5-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).