[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH Remus v2 02/10] tools/libxc: introduce setup() and cleanup() on save

On 05/11/2015 07:49 PM, Ian Campbell wrote:
On Mon, 2015-05-11 at 12:47 +0100, Ian Campbell wrote:
Actually this is another trick that I need to deal with those
hypercall macros.
DECLARE_HYPERCALL_BUFFER_SHADOW will define a user pointer "dirty_bitmap"
and a shadow buffer, although xc_hypercall_buffer_free_pages takes
"dirty_bitmap" as an augument, but it is also a MACRO, without
"if ( dirty_bitmap )", the compiler will report "dirty_bitmap" unused

Ah, in which case you would be better using
xc__hypercall_buffer_free_pages() and not creating the local shadow in
the first place.

I thought we'd better use those MACROs which described in the comments...
If it is OK to use xc__hypercall_buffer_free_pages(), I will fix it in
the next version.

If anything I think I'd prefer for the if to move inside the
xc_hypercall_buffer_free_pages macro.

Or if you want to use the "raw" xc__hypercall_buffer variant you should
be consistent and do the same on allocation.

I think I will add a patch that move the if inside the
xc_hypercall_buffer_free_pages macro.




Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.