Skip to contentSkip to conversation

kexec,i386: Remove unnecessary if condition check

PATCH Applied Zhang Yanfei 2 participants 2 messages Jan 10, 2013 – Jan 11, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kexec,i386: Remove unnecessary if condition check

If we load the relocatable bzImage, the boot protocol must >= 2.05, So the if condition check is unnecessary.

---
 kexec/arch/i386/kexec-bzImage.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
kexec/arch/i386/kexec-bzImage.c +2 -4
index fd214a3..0605909 100644
@@ -245,10 +245,8 @@ int do_bzImage_load(struct kexec_info *info,
 		unsigned long kern_align = real_mode->kernel_alignment;
 		unsigned long kernel32_max_addr = DEFAULT_BZIMAGE_ADDR_MAX;
 
-		if (real_mode->protocol_version >= 0x0203) {
-			if (kernel32_max_addr > real_mode->initrd_addr_max)
-				kernel32_max_addr = real_mode->initrd_addr_max;
-		}
+		if (kernel32_max_addr > real_mode->initrd_addr_max)
+			kernel32_max_addr = real_mode->initrd_addr_max;
 
 		kernel32_load_addr = add_buffer(info, kernel + kern16_size,
 						size, size, kern_align,
Signature · 6 lines
1.7.1

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec