From: Américo Wang Date: Mon, 16 Feb 2009 10:54:21 +0000 (+0800) Subject: sched: use TASK_NICE for task_struct X-Git-Tag: firefly_0821_release~15233^2~19 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2b8f836fb196acede88b6cc772e9057e0a9c0223;hp=a0a522ce3d6d8c907e45d4f2730ee8573484cc88;p=firefly-linux-kernel-4.4.55.git sched: use TASK_NICE for task_struct #define TASK_NICE(p) PRIO_TO_NICE((p)->static_prio) So it's better to use TASK_NICE here. Signed-off-by: WANG Cong Acked-by: Peter Zijlstra Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 648154cf1117..5475d56a20f1 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5236,7 +5236,7 @@ SYSCALL_DEFINE1(nice, int, increment) if (increment > 40) increment = 40; - nice = PRIO_TO_NICE(current->static_prio) + increment; + nice = TASK_NICE(current) + increment; if (nice < -20) nice = -20; if (nice > 19)