[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <161667051806.398.14556471814285205703.tip-bot2@tip-bot2>
Date: Thu, 25 Mar 2021 11:08:38 -0000
From: "tip-bot2 for Rasmus Villemoes" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/core: Stop using magic values in sched_dynamic_mode()
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 7e1b2eb74928b2478fd0630ce6c664334b480d00
Gitweb: https://git.kernel.org/tip/7e1b2eb74928b2478fd0630ce6c664334b480d00
Author: Rasmus Villemoes <linux@...musvillemoes.dk>
AuthorDate: Thu, 25 Mar 2021 01:45:14 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Thu, 25 Mar 2021 11:39:12 +01:00
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@...musvillemoes.dk>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: https://lore.kernel.org/r/20210325004515.531631-1-linux@rasmusvillemoes.dk
---
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 3384ea7..1fe9d3f 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;
}
Powered by blists - more mailing lists