WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] cleanup for __start_xen()

To: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] cleanup for __start_xen()
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Mon, 30 Nov 2009 17:39:53 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 30 Nov 2009 09:40:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4B136574.7010603@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <4B136574.7010603@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Xiao Guangrong writes ("[Xen-devel] [PATCH] cleanup for __start_xen()"):
> Remove repetitive judgment in __start_xen()
> 
> Signed-off-by: Xiao Guangrong <xiaoguangrong@xxxxxxxxxxxxxx>
> 
> diff --git a/a/xen/arch/x86/setup.c b/b/xen/arch/x86/setup.c
> index d87d082..563e46a 100644
> --- a/a/xen/arch/x86/setup.c
> +++ b/b/xen/arch/x86/setup.c
> @@ -729,7 +729,7 @@ void __init __start_xen(unsigned long mbi_p)
>  #endif
>  
>          /* Is the region suitable for relocating the multiboot modules? */
> -        if ( !initial_images_start && (s < e) &&
> +        if ( !initial_images_start &&

This is wrong.  s and e are uint64_t so if !(s < e), (e-s) will be
large and positive.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel