diff options
author | Adrian Bunk <bunk@stusta.de> | 2004-12-27 04:51:40 -0800 |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2004-12-27 04:51:40 -0800 |
commit | 77155e150ec78e53299c3f7f8bbf1720e83081d3 (patch) | |
tree | 351091ab8ebb5b3b1a5f77b71db4f9014f670978 /net | |
parent | 6c94b148ebe13dd9bca5829ee76dcd74ab12996c (diff) | |
download | history-77155e150ec78e53299c3f7f8bbf1720e83081d3.tar.gz |
[PKT_SCHED]: Staticize and other cleanups.
The patch below contans the following possible cleanups:
- make some needlessly global code static
- sch_htb.c: #undef HTB_DEBUG
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/gact.c | 2 | ||||
-rw-r--r-- | net/sched/police.c | 8 | ||||
-rw-r--r-- | net/sched/sch_api.c | 11 | ||||
-rw-r--r-- | net/sched/sch_dsmark.c | 2 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 4 | ||||
-rw-r--r-- | net/sched/sch_htb.c | 2 | ||||
-rw-r--r-- | net/sched/sch_ingress.c | 2 | ||||
-rw-r--r-- | net/sched/sch_prio.c | 3 |
8 files changed, 18 insertions, 16 deletions
diff --git a/net/sched/gact.c b/net/sched/gact.c index 1cf0b171439137..a65d2d6689f68c 100644 --- a/net/sched/gact.c +++ b/net/sched/gact.c @@ -68,7 +68,7 @@ gact_determ(struct tcf_gact *p) { } -g_rand gact_rand[MAX_RAND]= { NULL,gact_net_rand, gact_determ}; +static g_rand gact_rand[MAX_RAND]= { NULL,gact_net_rand, gact_determ}; #endif static int diff --git a/net/sched/police.c b/net/sched/police.c index 13fe565ae886ed..b8c54c5727e51d 100644 --- a/net/sched/police.c +++ b/net/sched/police.c @@ -163,7 +163,7 @@ void tcf_police_destroy(struct tcf_police *p) } #ifdef CONFIG_NET_CLS_ACT -int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *a, int ovr, int bind) +static int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *a, int ovr, int bind) { unsigned h; int ret = 0; @@ -272,7 +272,7 @@ failure: return -1; } -int tcf_act_police_cleanup(struct tc_action *a, int bind) +static int tcf_act_police_cleanup(struct tc_action *a, int bind) { struct tcf_police *p; p = PRIV(a); @@ -282,7 +282,7 @@ int tcf_act_police_cleanup(struct tc_action *a, int bind) return 0; } -int tcf_act_police(struct sk_buff **pskb, struct tc_action *a) +static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a) { psched_time_t now; struct sk_buff *skb = *pskb; @@ -345,7 +345,7 @@ int tcf_act_police(struct sk_buff **pskb, struct tc_action *a) return p->action; } -int tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) +static int tcf_act_police_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) { unsigned char *b = skb->tail; struct tc_police opt; diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index fff96b79613e51..a8570f361d6d88 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -207,7 +207,7 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle) return NULL; } -struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid) +static struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid) { unsigned long cl; struct Qdisc *leaf; @@ -226,7 +226,7 @@ struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid) /* Find queueing discipline by name */ -struct Qdisc_ops *qdisc_lookup_ops(struct rtattr *kind) +static struct Qdisc_ops *qdisc_lookup_ops(struct rtattr *kind) { struct Qdisc_ops *q = NULL; @@ -290,7 +290,7 @@ void qdisc_put_rtab(struct qdisc_rate_table *tab) /* Allocate an unique handle from space managed by kernel */ -u32 qdisc_alloc_handle(struct net_device *dev) +static u32 qdisc_alloc_handle(struct net_device *dev) { int i = 0x10000; static u32 autohandle = TC_H_MAKE(0x80000000U, 0); @@ -356,8 +356,9 @@ dev_graft_qdisc(struct net_device *dev, struct Qdisc *qdisc) Old qdisc is not destroyed but returned in *old. */ -int qdisc_graft(struct net_device *dev, struct Qdisc *parent, u32 classid, - struct Qdisc *new, struct Qdisc **old) +static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, + u32 classid, + struct Qdisc *new, struct Qdisc **old) { int err = 0; struct Qdisc *q = *old; diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 96203ed84151c3..d617b7aa6f561f 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c @@ -320,7 +320,7 @@ static unsigned int dsmark_drop(struct Qdisc *sch) } -int dsmark_init(struct Qdisc *sch,struct rtattr *opt) +static int dsmark_init(struct Qdisc *sch,struct rtattr *opt) { struct dsmark_qdisc_data *p = PRIV(sch); struct rtattr *tb[TCA_DSMARK_MAX]; diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 1b91809449041a..35e87b35a33f94 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -283,7 +283,7 @@ struct Qdisc noop_qdisc = { .list = LIST_HEAD_INIT(noop_qdisc.list), }; -struct Qdisc_ops noqueue_qdisc_ops = { +static struct Qdisc_ops noqueue_qdisc_ops = { .next = NULL, .cl_ops = NULL, .id = "noqueue", @@ -294,7 +294,7 @@ struct Qdisc_ops noqueue_qdisc_ops = { .owner = THIS_MODULE, }; -struct Qdisc noqueue_qdisc = { +static struct Qdisc noqueue_qdisc = { .enqueue = NULL, .dequeue = noop_dequeue, .flags = TCQ_F_BUILTIN, diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 2de5a8a0148185..25fa2c06f139cb 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -71,7 +71,7 @@ #define HTB_HSIZE 16 /* classid hash size */ #define HTB_EWMAC 2 /* rate average over HTB_EWMAC*HTB_HSIZE sec */ -#define HTB_DEBUG 1 /* compile debugging support (activated by tc tool) */ +#undef HTB_DEBUG /* compile debugging support (activated by tc tool) */ #define HTB_RATECM 1 /* whether to use rate computer */ #define HTB_HYSTERESIS 1/* whether to use mode hysteresis for speedup */ #define HTB_QLOCK(S) spin_lock_bh(&(S)->dev->queue_lock) diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c index 7ea1d35e1cce03..fd751a57fff1f8 100644 --- a/net/sched/sch_ingress.c +++ b/net/sched/sch_ingress.c @@ -274,7 +274,7 @@ static struct nf_hook_ops ing_ops = { #endif #endif -int ingress_init(struct Qdisc *sch,struct rtattr *opt) +static int ingress_init(struct Qdisc *sch,struct rtattr *opt) { struct ingress_qdisc_data *p = PRIV(sch); diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 7804835a2d37ec..2f06270cad4bc6 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -47,7 +47,8 @@ struct prio_sched_data }; -struct Qdisc *prio_classify(struct sk_buff *skb, struct Qdisc *sch,int *r) +static struct Qdisc *prio_classify(struct sk_buff *skb, + struct Qdisc *sch, int *r) { struct prio_sched_data *q = qdisc_priv(sch); u32 band = skb->priority; |