Skip to contentSkip to conversation

init:main.c: Fixed issues in Block comments and removed braces in single statement if block

PATCH In review janani-sankarababu 2 participants 2 messages Jul 28, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 init:main.c: Fixed issues in Block comments and removed braces in single statement if block

---
 init/main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
init/main.c +4 -3
index 052481f..f8eb4966 100644
@@ -181,7 +181,8 @@ static bool __init obsolete_checksetup(char *line)
 				/* Already done in parse_early_param?
 				 * (Needs exact match on param part).
 				 * Keep iterating, as we can have early
-				 * params and __setups of same names 8( */
+				 * params and __setups of same names
+				 */
 				if (line[n] == '\0' || line[n] == '=')
 					had_early_param = true;
 			} else if (!p->setup_func) {
@@ -693,9 +694,9 @@ asmlinkage __visible void __init start_kernel(void)
 	arch_post_acpi_subsys_init();
 	sfi_init_late();
 
-	if (efi_enabled(EFI_RUNTIME_SERVICES)) {
+	if (efi_enabled(EFI_RUNTIME_SERVICES))
 		efi_free_boot_services();
-	}
+
 
 	/* Do the rest non-__init'ed, we're now alive */
 	rest_init();
Signature · 1 line
1.9.1
#1 lore raw
Quoted 11 lines · On Fri, 28 Jul 2017 11:37:33 +0530 janani-sankarababu <[email protected]>…
---
 init/main.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
init/main.c +0 -0
index 052481f..f8eb4966 100644

init/main.c static bool __init obsolete_checksetup(char *line) · line 184

Quoted 5 lines
init/main.c +1 -1
@@ -181,7 +181,8 @@ static bool __init obsolete_checksetup(char *line)
 				/* Already done in parse_early_param?
 				 * (Needs exact match on param part).
 				 * Keep iterating, as we can have early
-				 * params and __setups of same names 8( */
+				 * params and __setups of same names

Why did you get rid of the "8(" part? Yeah, it's a kind of an old fashion emoji, but it helps make the code stand out as something that we can improve on in the future.

init/main.c asmlinkage __visible void __init start_kernel(void) · line 699

Quoted 13 lines
init/main.c +3 -2
+				 */
 				if (line[n] == '\0' || line[n] == '=')
 					had_early_param = true;
 			} else if (!p->setup_func) {
@@ -693,9 +694,9 @@ asmlinkage __visible void __init start_kernel(void)
 	arch_post_acpi_subsys_init();
 	sfi_init_late();
 
-	if (efi_enabled(EFI_RUNTIME_SERVICES)) {
+	if (efi_enabled(EFI_RUNTIME_SERVICES))
 		efi_free_boot_services();
-	}
+

Honestly, I'm not too thrilled with these patches. It causes churn to the code history with very little benefit. Usually these types of clean ups are done when the code is modified for functional reasons.

Brackets for single instruction blocks isn't needed. But it's not something we should go out of our way to "fix".

-- Steve

Quoted 3 lines
init/main.c +0 -0
 	/* Do the rest non-__init'ed, we're now alive */
 	rest_init();