* [PATCH] preempt/dynamic: Fix setup_preempt_mode() return value
@ 2021-12-03 23:32 Andrew Halaney
2021-12-04 9:40 ` Peter Zijlstra
2021-12-04 13:40 ` [tip: sched/urgent] " tip-bot2 for Andrew Halaney
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Halaney @ 2021-12-03 23:32 UTC (permalink / raw)
To: peterz
Cc: mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt,
bsegall, mgorman, bristot, frederic, mark.rutland, linux-kernel,
Andrew Halaney
__setup() callbacks expect 1 for success and 0 for failure. Correct the
usage here to reflect that.
Fixes: 826bfeb37bb4 ("preempt/dynamic: Support dynamic preempt with preempt= boot option")
Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
---
kernel/sched/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3592942ea29c..d4f60583be6e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6730,11 +6730,11 @@ static int __init setup_preempt_mode(char *str)
int mode = sched_dynamic_mode(str);
if (mode < 0) {
pr_warn("Dynamic Preempt: unsupported mode: %s\n", str);
- return 1;
+ return 0;
}
sched_dynamic_update(mode);
- return 0;
+ return 1;
}
__setup("preempt=", setup_preempt_mode);
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] preempt/dynamic: Fix setup_preempt_mode() return value
2021-12-03 23:32 [PATCH] preempt/dynamic: Fix setup_preempt_mode() return value Andrew Halaney
@ 2021-12-04 9:40 ` Peter Zijlstra
2021-12-04 13:40 ` [tip: sched/urgent] " tip-bot2 for Andrew Halaney
1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2021-12-04 9:40 UTC (permalink / raw)
To: Andrew Halaney
Cc: mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt,
bsegall, mgorman, bristot, frederic, mark.rutland, linux-kernel
On Fri, Dec 03, 2021 at 05:32:03PM -0600, Andrew Halaney wrote:
> __setup() callbacks expect 1 for success and 0 for failure. Correct the
> usage here to reflect that.
>
> Fixes: 826bfeb37bb4 ("preempt/dynamic: Support dynamic preempt with preempt= boot option")
> Reported-by: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip: sched/urgent] preempt/dynamic: Fix setup_preempt_mode() return value
2021-12-03 23:32 [PATCH] preempt/dynamic: Fix setup_preempt_mode() return value Andrew Halaney
2021-12-04 9:40 ` Peter Zijlstra
@ 2021-12-04 13:40 ` tip-bot2 for Andrew Halaney
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Andrew Halaney @ 2021-12-04 13:40 UTC (permalink / raw)
To: linux-tip-commits
Cc: Mark Rutland, Andrew Halaney, Peter Zijlstra (Intel), x86,
linux-kernel
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: 9ed20bafc85806ca6c97c9128cec46c3ef80ae86
Gitweb: https://git.kernel.org/tip/9ed20bafc85806ca6c97c9128cec46c3ef80ae86
Author: Andrew Halaney <ahalaney@redhat.com>
AuthorDate: Fri, 03 Dec 2021 17:32:03 -06:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Sat, 04 Dec 2021 10:56:18 +01:00
preempt/dynamic: Fix setup_preempt_mode() return value
__setup() callbacks expect 1 for success and 0 for failure. Correct the
usage here to reflect that.
Fixes: 826bfeb37bb4 ("preempt/dynamic: Support dynamic preempt with preempt= boot option")
Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20211203233203.133581-1-ahalaney@redhat.com
---
kernel/sched/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 76f9dee..814c52d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6617,11 +6617,11 @@ static int __init setup_preempt_mode(char *str)
int mode = sched_dynamic_mode(str);
if (mode < 0) {
pr_warn("Dynamic Preempt: unsupported mode: %s\n", str);
- return 1;
+ return 0;
}
sched_dynamic_update(mode);
- return 0;
+ return 1;
}
__setup("preempt=", setup_preempt_mode);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-04 13:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-03 23:32 [PATCH] preempt/dynamic: Fix setup_preempt_mode() return value Andrew Halaney
2021-12-04 9:40 ` Peter Zijlstra
2021-12-04 13:40 ` [tip: sched/urgent] " tip-bot2 for Andrew Halaney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.