Commit 7e1b2eb7 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Ingo Molnar
Browse files

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: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: https://lore.kernel.org/r/20210325004515.531631-1-linux@rasmusvillemoes.dk
parent acb4decc
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
}