Skip to content

Commit

Permalink
preempt/dynamic: Fix setup_preempt_mode() return value
Browse files Browse the repository at this point in the history
__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 <[email protected]>
Signed-off-by: Andrew Halaney <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
ahalaney authored and Peter Zijlstra committed Dec 4, 2021
1 parent e7f2be1 commit 9ed20ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9ed20ba

Please sign in to comment.