|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 2/3] xen/gnttab: address violations of MISRA C Rule 13.6
On 10.09.2024 21:06, Federico Serafini wrote:
> --- a/xen/common/compat/grant_table.c
> +++ b/xen/common/compat/grant_table.c
> @@ -78,12 +78,15 @@ int compat_grant_table_op(
> cmd_op = cmd;
> switch ( cmd_op )
> {
> -#define CASE(name) \
> - case GNTTABOP_##name: \
> - if ( unlikely(!guest_handle_okay(guest_handle_cast(uop, \
> -
> gnttab_##name##_compat_t), \
> - count)) ) \
> - rc = -EFAULT; \
> +#define CASE(name) \
> + case GNTTABOP_ ## name: \
Why the re-indentation? The earlier way was pretty intentional, to match
what a non-macroized case label would look like in this switch.
> + { \
> + XEN_GUEST_HANDLE_PARAM(gnttab_ ## name ## _compat_t) h = \
> + guest_handle_cast(uop, gnttab_ ## name ## _compat_t); \
> + \
> + if ( unlikely(!guest_handle_okay(h, count)) ) \
> + rc = -EFAULT; \
Same question as for the earlier patch - where's the potential side
effect?
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |