* [PATCH] sched/core: Add in additional const on preempt_modes array declaration
@ 2021-04-16 8:35 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2021-04-16 8:35 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Checkpatch warnings that there is a missing const, fix this by adding it.
Clean us up warning:
"WARNING: static const char * array should probably be static
const char * const"
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
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 42c06fccade5..beaa6263f4c3 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5472,7 +5472,7 @@ static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf,
static int sched_dynamic_show(struct seq_file *m, void *v)
{
- static const char * preempt_modes[] = {
+ static const char * const preempt_modes[] = {
"none", "voluntary", "full"
};
int i;
--
2.30.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-16 8:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 8:35 [PATCH] sched/core: Add in additional const on preempt_modes array declaration Colin King
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®