|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/3] libx86: introduce a helper to deserialise msr_policy objects
On Mon, Feb 25, 2019 at 03:47:13PM +0000, Andrew Cooper wrote:
> +
> + switch ( data.idx )
> + {
> + /*
> + * Assign data.val to 'field', checking for truncation if the
> + * backing storage for 'field' is smaller than uint64_t
> + */
> +#define ASSIGN(field) \
> +({ \
> + if ( (typeof(field))data.val != data.val ) \
> + { \
> + rc = -EOVERFLOW; \
> + goto err; \
> + } \
> + field = data.val; \
Missing parentheses around "field" in the macro. Although I don't think
it will break in practice, it is better to follow general macro writing
rules.
Other than this, this patch looks good to me.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |