On 16.08.2025 18:31, 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. > > To achieve MISRA compliance, the condition is expanded inline at all > call sites,
That's not correct. Andrew's description specifically said "..., 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." Imo this wording wants adding back, with adjustments as necessary to make it fit the rest of the sentence. (Likely doable on commit, if no other reason for a v3 arises.) Jan > using plain C constructs. This ensures clarity while > retaining the original behavior. 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>