On 8/26/25 09:07, Jan Beulich wrote: > On 25.08.2025 21:22, Dmytro Prokopchuk1 wrote: >> From: Andrew Cooper <[email protected]> >> >> 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 <[email protected]> >> Signed-off-by: Dmytro Prokopchuk <[email protected]> >> --- >> 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
Hi Stefano, please, take a look. Maybe this patch is OK for you (it requires minor typo fix, mentioned by Jan)? Thanks, Dmytro.
