init/main.c: Fixes quoted string split across lines & missing blank line after declaration
PATCH 2/2 init/main.c: Fixes quoted string split across lines & missing blank line after declaration
Signed-off-by Janani S <[email protected]>
--- init/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
init/main.c +4 -1
@@ -176,6 +176,7 @@ static bool __init obsolete_checksetup(char *line) p = __setup_start; do { int n = strlen(p->str); + if (parameqn(line, p->str, n)) { if (p->early) { /* Already done in parse_early_param?
@@ -302,6 +303,7 @@ static int __init unknown_bootoption(char *param, char *val,if (val) {/* Environment option */ unsigned int i; +for (i =0 ; envp_init[i]; i++) {if (i ==MAX_INIT_ENVS ) { panic_later ="env" ;
@@ -314,6 +316,7 @@ static int __init unknown_bootoption(char *param, char *val, }else {/* Command line option */ unsigned int i; +for (i =0 ; argv_init[i]; i++) {if (i ==MAX_INIT_ARGS ) { panic_later ="init" ;
@@ -1020,7 +1023,7 @@ static int __ref kernel_init(void *unused) !try_to_run_init_process("/bin/sh"))return 0 ; -panic ("No working init found. Try passing init= option to kernel. " +panic ("No working init found. Try passing init= option to kernel.\n" "See Linux Documentation/admin-guide/init.rst for guidance." ); }
Signature · 1 line
1.9.1
Quoted 10 lines · On Fri, 28 Jul 2017 11:56:46 +0530 janani-sankarababu <[email protected]>…
Signed-off-by Janani S <[email protected]>--- init/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)init/main.c +0
-0
init/main.c static bool __init obsolete_checksetup(char *line) · line 179
Quoted 4 lines
init/main.c +1
-0@@ -176,6 +176,7 @@ static bool __init obsolete_checksetup(char *line) p = __setup_start; do { int n = strlen(p->str); +
Not sure this is really needed. It's in a block and being assigned. The code looks fine as is.
Quoted 12 lines
init/main.c +1
-0if (parameqn (line, p->str, n)) {if (p->early) {/* Already done in parse_early_param? @@ -302,6 +303,7 @@ static int __init unknown_bootoption(char *param, char *val,if (val) {/* Environment option */ unsigned int i; +for (i =0 ; envp_init[i]; i++) {if (i ==MAX_INIT_ENVS ) { panic_later ="env" ;
init/main.c static int __init unknown_bootoption(char *param, char *val, · line 319
Quoted 4 lines
init/main.c +1
-0@@ -314,6 +316,7 @@ static int __init unknown_bootoption(char *param, char *val, }else {/* Command line option */ unsigned int i; +
This breaks up the flow of the blocks. The real fix isn't to add blank lines, but to remove both of these i declarations and add just a single one at the top of the function.
init/main.c static int __ref kernel_init(void *unused) · line 1027
Quoted 10 lines
init/main.c +1
-1for (i =0 ; argv_init[i]; i++) {if (i ==MAX_INIT_ARGS ) { panic_later ="init" ;@@ -1020,7 +1023,7 @@ static int __ref kernel_init(void *unused) !try_to_run_init_process("/bin/sh"))return 0 ; -panic ("No working init found. Try passing init= option to kernel. " +panic ("No working init found. Try passing init= option to kernel.\n" "See Linux Documentation/admin-guide/init.rst for guidance." );
This change is fine.
-- Steve
Quoted 2 lines
init/main.c +0
-0}