Re: [PATCH] sched: kill unused parameter of pick_next_task()

From: AmÃrico Wang
Date: Mon Mar 02 2009 - 02:44:28 EST


On Mon, Mar 02, 2009 at 02:52:54PM +0800, Wang Chen wrote:
>AmÃrico Wang said the following on 2009-3-2 14:13:
>> On Mon, Mar 02, 2009 at 01:55:26PM +0800, Wang Chen wrote:
>>> based on tip/sched/cleanups
>>>
>>> impact: no change in functionality
>>>
>>> Parameter "prev" seems like an unusable thing.
>>>
>>> Signed-off-by: Wang Chen <wangchen@xxxxxxxxxxxxxx>
>>> ---
>>> kernel/sched.c | 6 +++---
>>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/kernel/sched.c b/kernel/sched.c
>>> index 410eec4..57f8b12 100644
>>> --- a/kernel/sched.c
>>> +++ b/kernel/sched.c
>>> @@ -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);
>> ^^^^^
>>
>> 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)".
>;)
>

Oops, I misread the patch. Then it's OK. :)


--
Do what you love, f**k the rest! F**k the regulations!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/