summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2021-03-25 01:45:14 +0100
committerIngo Molnar <mingo@kernel.org>2021-03-25 11:39:12 +0100
commit7e1b2eb74928b2478fd0630ce6c664334b480d00 (patch)
tree033ec9daf4b6ff083bde39ee25184aef2449d049 /kernel/sched
parentacb4decc1e900468d51b33c5f1ee445278e716a7 (diff)
downloadlinux-7e1b2eb74928b2478fd0630ce6c664334b480d00.tar.bz2
sched/core: Stop using magic values in sched_dynamic_mode()
Use the enum names which are also what is used in the switch() in sched_dynamic_update(). Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: https://lore.kernel.org/r/20210325004515.531631-1-linux@rasmusvillemoes.dk
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3384ea74cad4..1fe9d3f31a73 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5376,13 +5376,13 @@ static int preempt_dynamic_mode = preempt_dynamic_full;
static int sched_dynamic_mode(const char *str)
{
if (!strcmp(str, "none"))
- return 0;
+ return preempt_dynamic_none;
if (!strcmp(str, "voluntary"))
- return 1;
+ return preempt_dynamic_voluntary;
if (!strcmp(str, "full"))
- return 2;
+ return preempt_dynamic_full;
return -1;
}