On 02.04.2024 17:43, Andrew Cooper wrote:
> MISRA Rule 13.6 doesn't like having an expression in a sizeof() which
> potentially has side effects.
> 
> Address several violations by pulling the expression out into a local
> variable.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>

Reviewed-by: Jan Beulich <jbeul...@suse.com>
with one caveat:

> --- a/xen/arch/x86/irq.c
> +++ b/xen/arch/x86/irq.c
> @@ -1150,8 +1150,9 @@ static void cf_check irq_guest_eoi_timer_fn(void *data)
>      {
>          struct domain *d = action->guest[i];
>          unsigned int pirq = domain_irq_to_pirq(d, irq);
> +        struct pirq *pirq_info = pirq_info(d, pirq);

Misra won't like the var's name matching the macro's. Can we go with just
"info"?

Jan

Reply via email to