]> xenbits.xensource.com Git - xen.git/commitdiff
xen: Replace ASSERT(0) with ASSERT_UNREACHABLE()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 21 Jun 2017 11:36:18 +0000 (12:36 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 23 Jun 2017 14:00:37 +0000 (15:00 +0100)
No functional change, but the result is more informative both in the code and
error messages if the assertions do get hit.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.gralL@arm.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/arm/mm.c
xen/common/tmem_xen.c
xen/drivers/passthrough/amd/iommu_acpi.c

index 411bab1ea9f7f14789a134056ebff9f68fd4a4c7..018f44a6d1aeed3ca56d6f4b71bf0dd107dfc333 100644 (file)
@@ -1154,7 +1154,7 @@ void arch_dump_shared_mem_info(void)
 
 int donate_page(struct domain *d, struct page_info *page, unsigned int memflags)
 {
-    ASSERT(0);
+    ASSERT_UNREACHABLE();
     return -ENOSYS;
 }
 
@@ -1166,7 +1166,7 @@ int steal_page(
 
 int page_is_ram_type(unsigned long mfn, unsigned long mem_type)
 {
-    ASSERT(0);
+    ASSERT_UNREACHABLE();
     return 0;
 }
 
index 06ce3ef1290687ff875b2c9611d325f6c49c6d82..725ae93b74c4f9d78c06d5fac2e7475d152d229b 100644 (file)
@@ -34,14 +34,14 @@ static DEFINE_PER_CPU_READ_MOSTLY(void *, scratch_page);
 static inline void *cli_get_page(xen_pfn_t cmfn, unsigned long *pcli_mfn,
                                  struct page_info **pcli_pfp, bool_t cli_write)
 {
-    ASSERT(0);
+    ASSERT_UNREACHABLE();
     return NULL;
 }
 
 static inline void cli_put_page(void *cli_va, struct page_info *cli_pfp,
                                 unsigned long cli_mfn, bool_t mark_dirty)
 {
-    ASSERT(0);
+    ASSERT_UNREACHABLE();
 }
 #else
 #include <asm/p2m.h>
index d8a92057842130ac984cd7212d3c89a9c9db737b..f4c7206c2a090a88f6282d8d9d2ea35a574b8770 100644 (file)
@@ -818,7 +818,7 @@ static u16 __init parse_ivhd_device_special(
             hpet_sbdf.init = HPET_IVHD;
             break;
         default:
-            ASSERT(0);
+            ASSERT_UNREACHABLE();
             break;
         }
         break;