diff options
author | Dongsheng Yang <yangds.fnst@cn.fujitsu.com> | 2014-02-11 02:34:45 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-02-22 12:11:29 -0500 |
commit | 7e298d60f717257dc8365c975f45ff9c37165362 (patch) | |
tree | 15e6df558a79c8343aa34f28cad33031f277523c | |
parent | 11c785b79ef2a669e4bf7be5cf2c3904b8fed015 (diff) |
sched/prio: Use DEFAULT_PRIO to define NICE_TO_PRIO() and PRIO_TO_NICE()
There is already a macro named DEFAULT_PRIO in prio.h, we can use it
to define NICE_TO_PRIO and PRIO_TO_NICE rather than use hard coding
of (MAX_RT_PRIO + 20).
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/4e28ec36fb49e8906027cbbdd900ab26a149905e.1392103744.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | include/linux/sched/prio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/sched/prio.h b/include/linux/sched/prio.h index 410ccb74c9e6..1ceaaa1da3e4 100644 --- a/include/linux/sched/prio.h +++ b/include/linux/sched/prio.h | |||
@@ -25,8 +25,8 @@ | |||
25 | * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], | 25 | * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], |
26 | * and back. | 26 | * and back. |
27 | */ | 27 | */ |
28 | #define NICE_TO_PRIO(nice) (MAX_RT_PRIO + (nice) + 20) | 28 | #define NICE_TO_PRIO(nice) ((nice) + DEFAULT_PRIO) |
29 | #define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO - 20) | 29 | #define PRIO_TO_NICE(prio) ((prio) - DEFAULT_PRIO) |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * 'User priority' is the nice value converted to something we | 32 | * 'User priority' is the nice value converted to something we |