public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KEXEC: Get rid of duplicate check for hole_end
@ 2013-01-30  1:33 Zhang Yanfei
  2013-01-30  1:52 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Yanfei @ 2013-01-30  1:33 UTC (permalink / raw)
  To: Eric W. Biederman, kexec@lists.infradead.org, Andrew Morton
  Cc: linux-kernel@vger.kernel.org

hole_end has been checked to make sure it is <= crash_res.end in the
while condition check, so the if condition check is duplicate.

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

diff --git a/kernel/kexec.c b/kernel/kexec.c
index 5e4bd78..c2826fc 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -497,8 +497,6 @@ static struct page *kimage_alloc_crash_control_pages(struct kimage *image,
 
 		if (hole_end > KEXEC_CRASH_CONTROL_MEMORY_LIMIT)
 			break;
-		if (hole_end > crashk_res.end)
-			break;
 		/* See if I overlap any of the segments */
 		for (i = 0; i < image->nr_segments; i++) {
 			unsigned long mstart, mend;
-- 
1.7.1

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

* Re: [PATCH] KEXEC: Get rid of duplicate check for hole_end
  2013-01-30  1:33 [PATCH] KEXEC: Get rid of duplicate check for hole_end Zhang Yanfei
@ 2013-01-30  1:52 ` Eric W. Biederman
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2013-01-30  1:52 UTC (permalink / raw)
  To: Zhang Yanfei
  Cc: kexec@lists.infradead.org, Andrew Morton,
	linux-kernel@vger.kernel.org

Zhang Yanfei <zhangyanfei@cn.fujitsu.com> writes:

> hole_end has been checked to make sure it is <= crash_res.end in the
> while condition check, so the if condition check is duplicate.

That test is definitely a duplicate.

Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>

> Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
> ---
>  kernel/kexec.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index 5e4bd78..c2826fc 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -497,8 +497,6 @@ static struct page *kimage_alloc_crash_control_pages(struct kimage *image,
>  
>  		if (hole_end > KEXEC_CRASH_CONTROL_MEMORY_LIMIT)
>  			break;
> -		if (hole_end > crashk_res.end)
> -			break;
>  		/* See if I overlap any of the segments */
>  		for (i = 0; i < image->nr_segments; i++) {
>  			unsigned long mstart, mend;

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

end of thread, other threads:[~2013-01-30  1:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30  1:33 [PATCH] KEXEC: Get rid of duplicate check for hole_end Zhang Yanfei
2013-01-30  1:52 ` Eric W. Biederman

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