preempt/dynamic: Fix setup_preempt_mode() return value
PATCH 1/1 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 <[email protected]>
Signed-off-by Andrew Halaney <[email protected]>
--- kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/core.c +2 -2
@@ -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);
Signature · 1 line
2.31.1
Peter Zijlstra
maintainerQuoted 6 lines · 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 <[email protected]>Signed-off-by Andrew Halaney <[email protected]>
Thanks!
The following commit has been merged into the sched/urgent branch of tip:
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 <[email protected]> AuthorDate: Fri, 03 Dec 2021 17:32:03 -06:00 Committer: Peter Zijlstra <[email protected]> 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 <[email protected]>
Signed-off-by Andrew Halaney <[email protected]>
Signed-off-by Peter Zijlstra (Intel) <[email protected]>
--- kernel/sched/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sched/core.c +2 -2
@@ -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);