]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/mm: Remove always true ASSERT() in free_heap_pages()
authorJulien Grall <jgrall@amazon.com>
Wed, 23 Feb 2022 18:38:31 +0000 (18:38 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 24 Feb 2022 14:57:55 +0000 (14:57 +0000)
free_heap_pages() has an ASSERT() checking that node is >= 0. However
node is defined as an unsigned int. So it cannot be negative.

Therefore remove the check as it will always be true.

Coverity-ID: 1055631
Signed-off-by: Julien Grall <jgrall@amazon.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com><mailto:andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/page_alloc.c

index 46357182375aedd655338cbe37ad5187afc8948b..e971bf91e0be5b92d2e2c78a82e1bc5ee31d4145 100644 (file)
@@ -1441,7 +1441,6 @@ static void free_heap_pages(
     unsigned int zone = page_to_zone(pg);
 
     ASSERT(order <= MAX_ORDER);
-    ASSERT(node >= 0);
 
     spin_lock(&heap_lock);