The tc util library parse/print has functions only used locally
(and some dead code removed).

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 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

Reply via email to