From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH iproute2 18/22] tc/util: make local functions static Date: Thu, 15 Nov 2018 14:36:36 -0800 Message-ID: <20181115223640.411-19-stephen@networkplumber.org> References: <20181115223640.411-1-stephen@networkplumber.org> Cc: Stephen Hemminger To: netdev@vger.kernel.org Return-path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:44887 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389029AbeKPIqo (ORCPT ); Fri, 16 Nov 2018 03:46:44 -0500 Received: by mail-pf1-f195.google.com with SMTP id b81-v6so9880317pfe.11 for ; Thu, 15 Nov 2018 14:37:00 -0800 (PST) In-Reply-To: <20181115223640.411-1-stephen@networkplumber.org> Sender: netdev-owner@vger.kernel.org List-ID: The tc util library parse/print has functions only used locally (and some dead code removed). Signed-off-by: Stephen Hemminger --- tc/tc_util.c | 17 +++-------------- tc/tc_util.h | 5 ----- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index a082c73c9350..82856a85170b 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -190,7 +190,7 @@ static const struct rate_suffix { { NULL } }; -int parse_percent_rate(char *rate, const char *str, const char *dev) +static int parse_percent_rate(char *rate, const char *str, const char *dev) { long dev_mbit; int ret; @@ -409,7 +409,7 @@ void print_devname(enum output_type type, int ifindex) "dev", "%s ", ifname); } -void print_size(char *buf, int len, __u32 sz) +static void print_size(char *buf, int len, __u32 sz) { double tmp = sz; @@ -427,17 +427,6 @@ char *sprint_size(__u32 size, char *buf) return buf; } -void print_qdisc_handle(char *buf, int len, __u32 h) -{ - snprintf(buf, len, "%x:", TC_H_MAJ(h)>>16); -} - -char *sprint_qdisc_handle(__u32 h, char *buf) -{ - print_qdisc_handle(buf, SPRINT_BSIZE-1, h); - return buf; -} - static const char *action_n2a(int action) { static char buf[64]; @@ -709,7 +698,7 @@ int get_linklayer(unsigned int *val, const char *arg) return 0; } -void print_linklayer(char *buf, int len, unsigned int linklayer) +static void print_linklayer(char *buf, int len, unsigned int linklayer) { switch (linklayer) { case LINKLAYER_UNSPEC: diff --git a/tc/tc_util.h b/tc/tc_util.h index e22c6da25696..825fea36a080 100644 --- a/tc/tc_util.h +++ b/tc/tc_util.h @@ -73,7 +73,6 @@ const char *get_tc_lib(void); struct qdisc_util *get_qdisc_kind(const char *str); struct filter_util *get_filter_kind(const char *str); -int parse_percent_rate(char *rate, const char *str, const char *dev); int get_qdisc_handle(__u32 *h, const char *str); int get_rate(unsigned int *rate, const char *str); int get_percent_rate(unsigned int *rate, const char *str, const char *dev); @@ -84,14 +83,10 @@ int get_size_and_cell(unsigned int *size, int *cell_log, char *str); int get_linklayer(unsigned int *val, const char *arg); void print_rate(char *buf, int len, __u64 rate); -void print_size(char *buf, int len, __u32 size); -void print_qdisc_handle(char *buf, int len, __u32 h); -void print_linklayer(char *buf, int len, unsigned int linklayer); void print_devname(enum output_type type, int ifindex); char *sprint_rate(__u64 rate, char *buf); char *sprint_size(__u32 size, char *buf); -char *sprint_qdisc_handle(__u32 h, char *buf); char *sprint_tc_classid(__u32 h, char *buf); char *sprint_ticks(__u32 ticks, char *buf); char *sprint_linklayer(unsigned int linklayer, char *buf); -- 2.17.1