Skip to contentSkip to conversation

kexec: remove unnecessary return

PATCH In review Xishi Qiu 3 participants 3 messages Aug 6, 2013

Subsystems (3)
lore
Share & tools
lore

Xishi Qiu

author
#0 lore raw

PATCH v2 1/1 kexec: remove unnecessary return

Code can not run here forever, so remove the unnecessary return.

---
 kernel/kexec.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
kernel/kexec.c +1 -4
index 59f7b55..2a74f30 100644
@@ -1474,11 +1474,8 @@ static int __init __parse_crashkernel(char *cmdline,
 	if (first_colon && (!first_space || first_colon < first_space))
 		return parse_crashkernel_mem(ck_cmdline, system_ram,
 				crash_size, crash_base);
-	else
-		return parse_crashkernel_simple(ck_cmdline, crash_size,
-				crash_base);
 
-	return 0;
+	return parse_crashkernel_simple(ck_cmdline, crash_size, crash_base);
 }
 
 /*
Signature · 7 lines
1.7.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Reviewed-by on v2 1/1
#1 lore raw
Quoted 4 lines · Xishi Qiu

Code can not run here forever, so remove the unnecessary return.

Quoted 30 lines
---
 kernel/kexec.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
kernel/kexec.c +1 -4
index 59f7b55..2a74f30 100644
@@ -1474,11 +1474,8 @@ static int __init __parse_crashkernel(char *cmdline,
 	if (first_colon && (!first_space || first_colon < first_space))
 		return parse_crashkernel_mem(ck_cmdline, system_ram,
 				crash_size, crash_base);
-	else
-		return parse_crashkernel_simple(ck_cmdline, crash_size,
-				crash_base);
 
-	return 0;
+	return parse_crashkernel_simple(ck_cmdline, crash_size, crash_base);
 }
 
 /*
Signature · 7 lines
1.7.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Reviewed-by on v2 1/1
#2 lore raw
In reply to Xishi Qiu
Quoted 4 lines · Xishi Qiu

Code can not run here forever, so remove the unnecessary return.

Quoted 22 lines
---
 kernel/kexec.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
kernel/kexec.c +1 -4
index 59f7b55..2a74f30 100644
@@ -1474,11 +1474,8 @@ static int __init __parse_crashkernel(char *cmdline,
 	if (first_colon && (!first_space || first_colon < first_space))
 		return parse_crashkernel_mem(ck_cmdline, system_ram,
 				crash_size, crash_base);
-	else
-		return parse_crashkernel_simple(ck_cmdline, crash_size,
-				crash_base);
 
-	return 0;
+	return parse_crashkernel_simple(ck_cmdline, crash_size, crash_base);
 }
 
 /*
Signature · 2 lines
Thanks.
Zhang Yanfei