From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] adjust assertion in alloc_heap_pages() Date: Thu, 23 Apr 2015 07:20:33 +0100 Message-ID: <5538AB510200007800074F3A@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartAB9FCB21.1__=" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YlAV5-0002Pm-5N for xen-devel@lists.xenproject.org; Thu, 23 Apr 2015 06:20:39 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Ian Campbell , Keir Fraser , Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartAB9FCB21.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Older gcc warns (and due to -Werror fails) on this ASSERT() now that "node" is of unsigned type. Make it more useful at once. Signed-off-by: Jan Beulich --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -604,7 +604,7 @@ static struct page_info *alloc_heap_page } first_node =3D node; =20 - ASSERT(node >=3D 0); + ASSERT(node < MAX_NUMNODES); ASSERT(zone_lo <=3D zone_hi); ASSERT(zone_hi < NR_ZONES); =20 --=__PartAB9FCB21.1__= Content-Type: text/plain; name="node-assert.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="node-assert.patch" adjust assertion in alloc_heap_pages()=0A=0AOlder gcc warns (and due to = -Werror fails) on this ASSERT() now that=0A"node" is of unsigned type. = Make it more useful at once.=0A=0ASigned-off-by: Jan Beulich =0A=0A--- a/xen/common/page_alloc.c=0A+++ b/xen/common/page_alloc.c=0A= @@ -604,7 +604,7 @@ static struct page_info *alloc_heap_page=0A }=0A = first_node =3D node;=0A =0A- ASSERT(node >=3D 0);=0A+ ASSERT(node = < MAX_NUMNODES);=0A ASSERT(zone_lo <=3D zone_hi);=0A ASSERT(zone_hi= < NR_ZONES);=0A =0A --=__PartAB9FCB21.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__PartAB9FCB21.1__=--