[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211124154246.116178-1-nsaenzju@redhat.com>
Date: Wed, 24 Nov 2021 16:42:46 +0100
From: Nicolas Saenz Julienne <nsaenzju@...hat.com>
To: peterz@...radead.org
Cc: mingo@...hat.com, juri.lelli@...hat.com, frederic@...nel.org,
linux-kernel@...r.kernel.org, mtosatti@...hat.com, mgorman@...e.de,
bsegall@...gle.com, rostedt@...dmis.org, dietmar.eggemann@....com,
bristot@...hat.com, vincent.guittot@...aro.org,
Nicolas Saenz Julienne <nsaenzju@...hat.com>
Subject: [PATCH] sched/core: Fix setup_preempt_mode() return values
__setup() expects its setup_func() implementations to return 1 on
success and 0 otherwise. So let's honor that.
This gets rid of the following kernel log:
"Unknown kernel command line parameters "preempt=full", will be
passed to user space."
Fixes: 826bfeb37bb4 ("preempt/dynamic: Support dynamic preempt with preempt= boot option")
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@...hat.com>
---
An alternative fix would be using early_param() instead of __setup(),
which actually takes 0 as success. But I figure __setup() was chosen for
a reason.
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 cd61e4109eecc..0d6eab5eeb4c9 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6657,11 +6657,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.33.1
Powered by blists - more mailing lists