>>> On 27.05.16 at 17:16, <julien.gr...@arm.com> wrote: > On 27/05/16 10:58, Jan Beulich wrote: >>>>> On 25.05.16 at 17:56, <julien.gr...@arm.com> wrote: >>> --- a/xen/common/compat/memory.c >>> +++ b/xen/common/compat/memory.c >>> @@ -253,6 +253,8 @@ int compat_memory_op(unsigned int cmd, >>> XEN_GUEST_HANDLE_PARAM(void) compat) >>> unsigned int size = cmp.atpb.size; >>> xen_ulong_t *idxs = (void *)(nat.atpb + 1); >>> xen_pfn_t *gpfns = (void *)(idxs + limit); >>> + enum XLAT_add_to_physmap_batch_u u = >>> + XLAT_add_to_physmap_batch_u_res0; >> >> Here you're cheating, and to help future readers understand you are >> you should say why this is okay in a comment. Or alternatively handle >> things properly. > > Well, this is the case on other place having to convert union (see > XENMEM_get_vnumainfo). So I though it was valid.
It depends on context whether you can go this way or need to use switch(). Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel