[RFC PATCH 22/86] Revert "sched/core: Stop using magic values in sched_dynamic_mode()"

From: Ankur Arora
Date: Tue Nov 07 2023 - 17:01:25 EST


This reverts commit 7e1b2eb74928b2478fd0630ce6c664334b480d00.

Signed-off-by: Ankur Arora <ankur.a.arora@xxxxxxxxxx>
---
kernel/sched/core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 673de11272fa..bbd19b8ff3e9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7001,13 +7001,13 @@ static int preempt_dynamic_mode = preempt_dynamic_full;
static int sched_dynamic_mode(const char *str)
{
if (!strcmp(str, "none"))
- return preempt_dynamic_none;
+ return 0;

if (!strcmp(str, "voluntary"))
- return preempt_dynamic_voluntary;
+ return 1;

if (!strcmp(str, "full"))
- return preempt_dynamic_full;
+ return 2;

return -1;
}
--
2.31.1