All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] adjust assertion in alloc_heap_pages()
@ 2015-04-23  6:20 Jan Beulich
  2015-04-23  9:07 ` Andrew Cooper
  2015-04-23  9:18 ` Tim Deegan
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Beulich @ 2015-04-23  6:20 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

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 <jbeulich@suse.com>

--- 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 = node;
 
-    ASSERT(node >= 0);
+    ASSERT(node < MAX_NUMNODES);
     ASSERT(zone_lo <= zone_hi);
     ASSERT(zone_hi < NR_ZONES);
 




[-- Attachment #2: node-assert.patch --]
[-- Type: text/plain, Size: 513 bytes --]

adjust assertion in alloc_heap_pages()

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 <jbeulich@suse.com>

--- 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 = node;
 
-    ASSERT(node >= 0);
+    ASSERT(node < MAX_NUMNODES);
     ASSERT(zone_lo <= zone_hi);
     ASSERT(zone_hi < NR_ZONES);
 

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2015-04-23  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23  6:20 [PATCH] adjust assertion in alloc_heap_pages() Jan Beulich
2015-04-23  9:07 ` Andrew Cooper
2015-04-23  9:18 ` Tim Deegan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.