netdev
[Top] [All Lists]

[PATCH 2.6 5/5]: act_api: mark some functions static/remove unused funct

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: [PATCH 2.6 5/5]: act_api: mark some functions static/remove unused function
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Thu, 04 Nov 2004 07:25:52 +0100
Cc: netdev@xxxxxxxxxxx, jamal <hadi@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20041008 Debian/1.7.3-5
Mark some functions static in act_api. tc_lookup_action_id was unused
so I removed it.


# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/11/04 06:45:26+01:00 kaber@xxxxxxxxxxxx 
#   [PKT_SCHED]: act_api: mark some functions static/remove unused function
#   
#   Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
# 
# net/sched/act_api.c
#   2004/11/04 06:45:20+01:00 kaber@xxxxxxxxxxxx +11 -33
#   [PKT_SCHED]: act_api: mark some functions static/remove unused function
#   
#   Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
# 
diff -Nru a/net/sched/act_api.c b/net/sched/act_api.c
--- a/net/sched/act_api.c       2004-11-04 07:17:32 +01:00
+++ b/net/sched/act_api.c       2004-11-04 07:17:32 +01:00
@@ -88,7 +88,7 @@
 }
 
 /* lookup by name */
-struct tc_action_ops *tc_lookup_action_n(char *kind)
+static struct tc_action_ops *tc_lookup_action_n(char *kind)
 {
 
        struct tc_action_ops *a = NULL;
@@ -111,7 +111,7 @@
 }
 
 /* lookup by rtattr */
-struct tc_action_ops *tc_lookup_action(struct rtattr *kind)
+static struct tc_action_ops *tc_lookup_action(struct rtattr *kind)
 {
 
        struct tc_action_ops *a = NULL;
@@ -134,28 +134,6 @@
        return a;
 }
 
-/* lookup by id */
-struct tc_action_ops *tc_lookup_action_id(u32 type)
-{
-       struct tc_action_ops *a = NULL;
-
-       if (type) {
-               read_lock(&act_mod_lock);
-               for (a = act_base; a; a = a->next) {
-                       if (a->type == type) {
-                               if (!try_module_get(a->owner)) {
-                                       read_unlock(&act_mod_lock);
-                                       return NULL;
-                               } 
-                               break;
-                       }
-               }
-               read_unlock(&act_mod_lock);
-       }
-
-       return a;
-}
-
 int tcf_action_exec(struct sk_buff *skb,struct tc_action *act, struct 
tcf_result *res)
 {
 
@@ -504,7 +482,7 @@
        return err;
 }
 
-int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct nlmsghdr 
*n, u32 pid)
+static int tcf_action_get_1(struct rtattr *rta, struct tc_action *a, struct 
nlmsghdr *n, u32 pid)
 {
        struct tc_action_ops *a_o;
        char act_name[4 + IFNAMSIZ + 1];
@@ -571,7 +549,7 @@
        return err;
 }
 
-void cleanup_a (struct tc_action *act) 
+static void cleanup_a (struct tc_action *act) 
 {
        struct tc_action *a;
 
@@ -587,7 +565,7 @@
        }
 }
 
-struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
+static struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
 {
        char act_name[4 + IFNAMSIZ + 1];
        struct tc_action_ops *a_o = NULL;
@@ -622,7 +600,7 @@
        return a_o;
 }
 
-struct tc_action *create_a(int i)
+static struct tc_action *create_a(int i)
 {
        struct tc_action *act = NULL;
 
@@ -639,7 +617,7 @@
        return act;
 }
 
-int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
+static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
 {
        struct sk_buff *skb;
        unsigned char *b;
@@ -709,7 +687,7 @@
        return err;
 }
 
-int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event )
+static int tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int 
event )
 {
 
        int s = 0;
@@ -793,7 +771,7 @@
 }
 
 
-int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, unsigned 
flags) 
+static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event, 
unsigned flags) 
 {
        struct tcamsg *t;
        struct nlmsghdr  *nlh;
@@ -840,7 +818,7 @@
 }
 
        
-int tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr ) 
+static int tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int 
ovr ) 
 {
        int ret = 0;
        struct tc_action *act = NULL;
@@ -923,7 +901,7 @@
        return ret;
 }
 
-char *
+static char *
 find_dump_kind(struct nlmsghdr *n)
 {
        struct rtattr *tb1, *tb2[TCA_ACT_MAX+1];
<Prev in Thread] Current Thread [Next in Thread>