Skip to content

Commit

Permalink
Remove redundant variable/code in __qdisc_run
Browse files Browse the repository at this point in the history
Remove redundant variable "work".

Signed-off-by: Krishna Kumar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
krkumar authored and davem330 committed Jul 15, 2011
1 parent 2af4ba8 commit f0c50c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f0c50c7

Please sign in to comment.