Re: [PATCH 2/3] xen/event: address violation of MISRA C Rule 13.6

2024-07-31 Thread Stefano Stabellini
On Wed, 31 Jul 2024, Jan Beulich wrote: > On 01.07.2024 10:16, Jan Beulich wrote: > > On 25.06.2024 12:14, Alessandro Zucchelli wrote: > >> --- a/xen/include/xen/event.h > >> +++ b/xen/include/xen/event.h > >> @@ -183,13 +183,14 @@ static bool evtchn_usable(const struct evtchn > >> *evtchn) > >>

Re: [PATCH 2/3] xen/event: address violation of MISRA C Rule 13.6

2024-07-30 Thread Jan Beulich
On 01.07.2024 10:16, Jan Beulich wrote: > On 25.06.2024 12:14, Alessandro Zucchelli wrote: >> --- a/xen/include/xen/event.h >> +++ b/xen/include/xen/event.h >> @@ -183,13 +183,14 @@ static bool evtchn_usable(const struct evtchn *evtchn) >> /* Wait on a Xen-attached event channel. */ >> #define wa

Re: [PATCH 2/3] xen/event: address violation of MISRA C Rule 13.6

2024-07-01 Thread Jan Beulich
On 25.06.2024 12:14, Alessandro Zucchelli wrote: > --- a/xen/include/xen/event.h > +++ b/xen/include/xen/event.h > @@ -183,13 +183,14 @@ static bool evtchn_usable(const struct evtchn *evtchn) > /* Wait on a Xen-attached event channel. */ > #define wait_on_xen_event_channel(port, condition)

Re: [PATCH 2/3] xen/event: address violation of MISRA C Rule 13.6

2024-06-25 Thread Stefano Stabellini
On Tue, 25 Jun 2024, Alessandro Zucchelli wrote: > In the file include/xen/event.h macro set_bit is called with argument > current->pause_flags. > Once expanded this set_bit's argument is used in sizeof operations > and thus 'current', being a macro that expands to a function > call with potential

[PATCH 2/3] xen/event: address violation of MISRA C Rule 13.6

2024-06-25 Thread Alessandro Zucchelli
In the file include/xen/event.h macro set_bit is called with argument current->pause_flags. Once expanded this set_bit's argument is used in sizeof operations and thus 'current', being a macro that expands to a function call with potential side effects, generates a violation. To address this viola