]> git.baikalelectronics.ru Git - kernel.git/commitdiff
preempt/dynamic: Fix setup_preempt_mode() return value
authorAndrew Halaney <ahalaney@redhat.com>
Fri, 3 Dec 2021 23:32:03 +0000 (17:32 -0600)
committerPeter Zijlstra <peterz@infradead.org>
Sat, 4 Dec 2021 09:56:18 +0000 (10:56 +0100)
__setup() callbacks expect 1 for success and 0 for failure. Correct the
usage here to reflect that.

Fixes: 8eb0bd8701cd ("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

index 76f9deeaa942099798f4851fbd85feab7c55d244..814c52d90c0fd00eee3d0c0e186cf2f3bd95f9ad 100644 (file)
@@ -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);