Skip to content

Commit 9ed20ba

Browse files
ahalaneyPeter Zijlstra
authored andcommitted
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: 826bfeb ("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
1 parent e7f2be1 commit 9ed20ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/sched/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6617,11 +6617,11 @@ static int __init setup_preempt_mode(char *str)
66176617
int mode = sched_dynamic_mode(str);
66186618
if (mode < 0) {
66196619
pr_warn("Dynamic Preempt: unsupported mode: %s\n", str);
6620-
return 1;
6620+
return 0;
66216621
}
66226622

66236623
sched_dynamic_update(mode);
6624-
return 0;
6624+
return 1;
66256625
}
66266626
__setup("preempt=", setup_preempt_mode);
66276627

0 commit comments

Comments
 (0)