public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] kexec,i386: Remove unnecessary if condition check
@ 2013-01-10  9:25 Zhang Yanfei
  2013-01-11  0:32 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Yanfei @ 2013-01-10  9:25 UTC (permalink / raw)
  To: horms; +Cc: kexec@lists.infradead.org

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

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
 kexec/arch/i386/kexec-bzImage.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c
index fd214a3..0605909 100644
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -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,
-- 
1.7.1

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kexec,i386: Remove unnecessary if condition check
  2013-01-10  9:25 [PATCH] kexec,i386: Remove unnecessary if condition check Zhang Yanfei
@ 2013-01-11  0:32 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2013-01-11  0:32 UTC (permalink / raw)
  To: Zhang Yanfei; +Cc: kexec@lists.infradead.org

On Thu, Jan 10, 2013 at 05:25:04PM +0800, Zhang Yanfei wrote:
> If we load the relocatable bzImage, the boot protocol must >= 2.05,
> So the if condition check is unnecessary.

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-11  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10  9:25 [PATCH] kexec,i386: Remove unnecessary if condition check Zhang Yanfei
2013-01-11  0:32 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox