Use BUILD_BUG_ON()s in preference to ASSERT(sizeof(foo) == sizeof (bar)).
sh_map_domain_page() is just a thin wrapper around map_domain_page(), which
cannot fail. Asserting its success is redundant.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
{
perfc_incr(shadow_linear_map_failed);
map = sh_map_domain_page(mfn);
- ASSERT(map != NULL);
dst = map + ((unsigned long)dst & (PAGE_SIZE - 1));
}
unsigned int slots;
sl4e = sh_map_domain_page(sl4mfn);
- ASSERT(sl4e != NULL);
- ASSERT(sizeof (l4_pgentry_t) == sizeof (shadow_l4e_t));
+ BUILD_BUG_ON(sizeof (l4_pgentry_t) != sizeof (shadow_l4e_t));
/* Copy the common Xen mappings from the idle domain */
slots = (shadow_mode_external(d)
return;
sl2e = sh_map_domain_page(sl2hmfn);
- ASSERT(sl2e != NULL);
- ASSERT(sizeof (l2_pgentry_t) == sizeof (shadow_l2e_t));
+ BUILD_BUG_ON(sizeof (l2_pgentry_t) != sizeof (shadow_l2e_t));
/* Copy the common Xen mappings from the idle domain */
memcpy(