On 25.08.2025 21:22, Dmytro Prokopchuk1 wrote:
> From: Andrew Cooper <andrew.coop...@citrix.com>
> 
> MISRA Rule 5.5 objects to a macro aliasing a function, which is what
> pirq_cleanup_check() does. The macro was originally intended to ensure
> the condition 'if (!pirq->evtchn)' is always checked before invoking
> the function, avoiding errors across call sites.
> 
> There are only a handful of users, so expand it inline to be plain
> regular C. Doing this shows one path now needing braces, and one path
> in 'evtchn_bind_pirq()' where the expanded form simplies back to no
> delta, as it follows an unconditional clear of 'info->evtchn'.
> 
> While this complies with MISRA, it shifts the responsibility to
> developers to check 'if (!pirq->evtchn)' at call sites.
> 
> No functional changes.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> Signed-off-by: Dmytro Prokopchuk <dmytro_prokopch...@epam.com>
> ---
> Changes in v3:
> - added back wording from v1, originally written by Andrew.

Thanks. Just to mention, though - you copied it verbatim, including the
typo (simplifies). Can surely be adjusted while committing, if and when
somebody acks this. (I think it has become sufficiently clear that I'm
not going to.)

Jan

Reply via email to