lkml.org 
[lkml]   [2018]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 20/45] C++: init/main: Constify pointers
From
Date
ramdisk_execute_command and initcall_level_names should be const char *
pointers.

Signed-off-by: David Howells <dhowells@redhat.com>
---

init/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index 969eaf140ef0..642e917387db 100644
--- a/init/main.c
+++ b/init/main.c
@@ -135,7 +135,7 @@ static char *static_command_line;
static char *initcall_command_line;

static char *execute_command;
-static char *ramdisk_execute_command;
+static const char *ramdisk_execute_command;

/*
* Used to generate warnings if static_key manipulation functions are used
@@ -873,7 +873,7 @@ static initcall_t *initcall_levels[] __initdata = {
};

/* Keep these in sync with initcalls in include/linux/init.h */
-static char *initcall_level_names[] __initdata = {
+static const char *initcall_level_names[] __initconst = {
"early",
"core",
"postcore",
\
 
 \ /
  Last update: 2018-04-01 22:42    [W:0.173 / U:0.548 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site