Remove redundant variable/code in __qdisc_run
authorKrishna Kumar <krkumar2@in.ibm.com>
Thu, 14 Jul 2011 23:16:21 +0000 (23:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2011 15:08:26 +0000 (08:08 -0700)
Remove redundant variable "work".

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_generic.c

index d253c16a314ce85838ba24d448f90fe1ed3fe865..69fca2798804f29f5cd3cbdadd139fdc6801e9d5 100644 (file)
@@ -190,16 +190,14 @@ static inline int qdisc_restart(struct Qdisc *q)
 void __qdisc_run(struct Qdisc *q)
 {
        int quota = weight_p;
-       int work = 0;
 
        while (qdisc_restart(q)) {
-               work++;
                /*
                 * Ordered by possible occurrence: Postpone processing if
                 * 1. we've exceeded packet quota
                 * 2. another process needs the CPU;
                 */
-               if (work >= quota || need_resched()) {
+               if (--quota <= 0 || need_resched()) {
                        __netif_schedule(q);
                        break;
                }