From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH 2/2] sched: use -EINVAL in sched_dynamic_mode
Date: Thu, 25 Mar 2021 01:45:15 +0100 [thread overview]
Message-ID: <20210325004515.531631-2-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20210325004515.531631-1-linux@rasmusvillemoes.dk>
-1 is -EPERM which is a somewhat odd error to return from
sched_dynamic_write(). No other callers care about which negative
value is used.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3959481261bb..5b29261668a6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5378,7 +5378,7 @@ static int sched_dynamic_mode(const char *str)
if (!strcmp(str, "full"))
return preempt_dynamic_full;
- return -1;
+ return -EINVAL;
}
static void sched_dynamic_update(int mode)
--
2.29.2
next prev parent reply other threads:[~2021-03-25 0:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 0:45 [PATCH 1/2] sched: stop using magic values " Rasmus Villemoes
2021-03-25 0:45 ` Rasmus Villemoes [this message]
2021-03-25 11:08 ` [tip: sched/core] sched/core: Use -EINVAL in sched_dynamic_mode() tip-bot2 for Rasmus Villemoes
2021-03-25 7:48 ` [PATCH 1/2] sched: stop using magic values in sched_dynamic_mode Peter Zijlstra
2021-03-25 11:08 ` [tip: sched/core] sched/core: Stop using magic values in sched_dynamic_mode() tip-bot2 for Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210325004515.531631-2-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®