sched: kill unused parameter of pick_next_task()
PATCH 1/1 sched: kill unused parameter of pick_next_task()
based on tip/sched/cleanups
impact: no change in functionality
Parameter "prev" seems like an unusable thing.
--- kernel/sched.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/sched.c +3 -3
@@ -4512,7 +4512,7 @@ static inline void schedule_debug(struct task_struct *prev)* Pick up the highest-prio task: */ static inline struct task_struct * -pick_next_task (struct rq *rq,struct task_struct *prev) +pick_next_task (struct rq *rq) {const struct sched_class *class;struct task_struct *p;
@@ -4587,7 +4587,7 @@ need_resched_nonpreemptible:idle_balance (cpu, rq); prev->sched_class->put_prev_task (rq, prev); - next =pick_next_task (rq, prev); + next =pick_next_task (rq);if (likely (prev != next)) {sched_info_switch (prev, next);
@@ -6423,7 +6423,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)if (!rq->nr_running)break ;update_rq_clock (rq); - next =pick_next_task (rq, rq->curr); + next =pick_next_task (rq);if (!next)break ; next->sched_class->put_prev_task (rq, next);
Signature · 1 line
1.5.3.4
Quoted 25 lines · Wang Chen
based on tip/sched/cleanups
impact: no change in functionality
Parameter "prev" seems like an unusable thing.
Signed-off-by Wang Chen <[email protected]>---
kernel/sched.c| 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)kernel/sched.c +0
-0@@ -4512,7 +4512,7 @@ static inline void schedule_debug(struct task_struct *prev)* Pick up the highest-prio task: */ static inline struct
task_struct*kernel/sched.c +1
-1-pick_next_task(struct rq *rq, struct task_struct *prev) +pick_next_task(struct rq *rq){ const struct sched_class *class; struct task_struct *p;
kernel/sched.c need_resched_nonpreemptible: · line 4589
Quoted 3 lines
kernel/sched.c +0
-0@@ -4587,7 +4587,7 @@ need_resched_nonpreemptible:idle_balance (cpu, rq); prev->sched_class->put_prev_task (rq, prev);
^^^^^
How about this? :)
kernel/sched.c need_resched_nonpreemptible: · line 4592
Quoted 4 lines
kernel/sched.c +1
-1- next =pick_next_task (rq, prev); + next =pick_next_task (rq);if (likely (prev != next)) {
^^^^
also here.
kernel/sched.c static void migrate_dead_tasks(unsigned int dead_cpu) · line 6429
Quoted 10 lines
kernel/sched.c +1
-1sched_info_switch (prev, next);@@ -6423,7 +6423,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)if (!rq->nr_running)break ;update_rq_clock (rq); - next =pick_next_task (rq, rq->curr); + next =pick_next_task (rq);if (!next)break ; next->sched_class->put_prev_task (rq, next);
I think you should check the latest linus-git, where you can safely just remove the parameter 'prev'.
Signature · 1 line
Do what you love, f**k the rest! F**k the regulations!
Américo Wang said the following on 2009-3-2 14:13:
Quoted 28 lines · Wang Chen
Quoted 27 lines
based on tip/sched/cleanups
impact: no change in functionality
Parameter "prev" seems like an unusable thing.
Signed-off-by Wang Chen <[email protected]>---
kernel/sched.c| 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)kernel/sched.c +0
-0@@ -4512,7 +4512,7 @@ static inline void schedule_debug(struct task_struct *prev)* Pick up the highest-prio task: */ static inline struct
task_struct*kernel/sched.c +1
-1-pick_next_task(struct rq *rq, struct task_struct *prev) +pick_next_task(struct rq *rq){ const struct sched_class *class; struct task_struct *p;kernel/sched.c +0
-0@@ -4587,7 +4587,7 @@ need_resched_nonpreemptible:idle_balance (cpu, rq);
Quoted 5 lines
kernel/sched.c need_resched_nonpreemptible: · line 4589
Quoted 1 line
kernel/sched.c +0
-0prev->sched_class->put_prev_task (rq, prev);^^^^^How about this? :)
need_resched_nonpreemptible is inside another function instead of pick_next_task(). Because "diff" doesn't know "asmlinkage void __sched schedule(void)". ;)
Quoted 23 lines
kernel/sched.c need_resched_nonpreemptible: · line 4592
Quoted 4 lines
kernel/sched.c +1
-1- next =pick_next_task (rq, prev); + next =pick_next_task (rq);if (likely (prev != next)) {^^^^also here.
kernel/sched.c static void migrate_dead_tasks(unsigned int dead_cpu) · line 6429
Quoted 10 lines
kernel/sched.c +1
-1sched_info_switch (prev, next);@@ -6423,7 +6423,7 @@ static void migrate_dead_tasks(unsigned int dead_cpu)if (!rq->nr_running)break ;update_rq_clock (rq); - next =pick_next_task (rq, rq->curr); + next =pick_next_task (rq);if (!next)break ; next->sched_class->put_prev_task (rq, next);I think you should check the latest linus-git, where you can safely just remove the parameter 'prev'.
Quoted 32 lines · Wang Chen
Américo Wang said the following on 2009-3-2 14:13:
Quoted 31 lines · Wang Chen
Quoted 25 lines
based on tip/sched/cleanups
impact: no change in functionality
Parameter "prev" seems like an unusable thing.
Signed-off-by Wang Chen <[email protected]>---
kernel/sched.c| 6 +++---1 files changed, 3 insertions(+), 3 deletions(-)kernel/sched.c +0
-0@@ -4512,7 +4512,7 @@ static inline void schedule_debug(struct task_struct *prev)* Pick up the highest-prio task: */ static inline struct
task_struct*kernel/sched.c +1
-1-pick_next_task(struct rq *rq, struct task_struct *prev) +pick_next_task(struct rq *rq){ const struct sched_class *class; struct task_struct *p;kernel/sched.c need_resched_nonpreemptible: · line 4589
Quoted 3 lines
kernel/sched.c +0
-0@@ -4587,7 +4587,7 @@ need_resched_nonpreemptible:idle_balance (cpu, rq); prev->sched_class->put_prev_task (rq, prev);^^^^^
Quoted 7 lines
Quoted 2 lines
How about this? :)
need_resched_nonpreemptibleis inside another function instead ofpick_next_task(). Because "diff" doesn't know "asmlinkage void__schedschedule(void)". ;)
Oops, I misread the patch. Then it's OK. :)
Signature · 1 line
Do what you love, f**k the rest! F**k the regulations!