* [PATCH] Remove redundant variable/code in __qdisc_run
@ 2011-07-15 9:16 Krishna Kumar
2011-07-15 15:09 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Krishna Kumar @ 2011-07-15 9:16 UTC (permalink / raw)
To: davem; +Cc: netdev, Krishna Kumar
Remove redundant variable "work".
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
---
net/sched/sch_generic.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff -ruNp org/net/sched/sch_generic.c new/net/sched/sch_generic.c
--- org/net/sched/sch_generic.c 2011-06-27 16:16:07.000000000 +0530
+++ new/net/sched/sch_generic.c 2011-07-13 10:58:39.000000000 +0530
@@ -190,16 +190,14 @@ static inline int qdisc_restart(struct 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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove redundant variable/code in __qdisc_run
2011-07-15 9:16 [PATCH] Remove redundant variable/code in __qdisc_run Krishna Kumar
@ 2011-07-15 15:09 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-07-15 15:09 UTC (permalink / raw)
To: krkumar2; +Cc: netdev
From: Krishna Kumar <krkumar2@in.ibm.com>
Date: Fri, 15 Jul 2011 14:46:21 +0530
> Remove redundant variable "work".
>
> Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-15 15:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-15 9:16 [PATCH] Remove redundant variable/code in __qdisc_run Krishna Kumar
2011-07-15 15:09 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).