lkml.org 
[lkml]   [2021]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] sched: use -EINVAL in sched_dynamic_mode
Date
-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
\
 
 \ /
  Last update: 2021-03-25 01:46    [W:0.045 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site