]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_htb.c
[PKT_SCHED] HTB: htb_classid is dead static inline
[linux-2.6-omap-h63xx.git] / net / sched / sch_htb.c
index 246a2f9765f1312c6f83092c31944db1bf9aaa1f..6a2352cd9c2eeac2a974a64df045ec938644dbd5 100644 (file)
@@ -132,10 +132,8 @@ struct htb_class {
 static inline long L2T(struct htb_class *cl, struct qdisc_rate_table *rate,
                           int size)
 {
-       int slot = size >> rate->rate.cell_log;
-       if (slot > 255)
-               return (rate->data[255]*(slot >> 8) + rate->data[slot & 0xFF]);
-       return rate->data[slot];
+       long result = qdisc_l2t(rate, size);
+       return result;
 }
 
 struct htb_sched {
@@ -216,10 +214,6 @@ static inline struct htb_class *htb_find(u32 handle, struct Qdisc *sch)
  * then finish and return direct queue.
  */
 #define HTB_DIRECT (struct htb_class*)-1
-static inline u32 htb_classid(struct htb_class *cl)
-{
-       return (cl && cl != HTB_DIRECT) ? cl->classid : TC_H_UNSPEC;
-}
 
 static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,
                                      int *qerr)
@@ -1531,7 +1525,7 @@ static void htb_walk(struct Qdisc *sch, struct qdisc_walker *arg)
        }
 }
 
-static struct Qdisc_class_ops htb_class_ops = {
+static const struct Qdisc_class_ops htb_class_ops = {
        .graft          =       htb_graft,
        .leaf           =       htb_leaf,
        .qlen_notify    =       htb_qlen_notify,
@@ -1547,7 +1541,7 @@ static struct Qdisc_class_ops htb_class_ops = {
        .dump_stats     =       htb_dump_class_stats,
 };
 
-static struct Qdisc_ops htb_qdisc_ops = {
+static struct Qdisc_ops htb_qdisc_ops __read_mostly = {
        .next           =       NULL,
        .cl_ops         =       &htb_class_ops,
        .id             =       "htb",