Re: Devise macros to encapsulate (x & -x)

2023-11-22 Thread Stefano Stabellini
On Wed, 22 Nov 2023, Nicola Vetrini wrote: > > > > > > Jan, would you be willing to accept that other maintainers have a > > > preference for having a single MACRO even if suboptimal? > > > > I can live with that, even if I'm surprised by this perspective that others > > take. How can we, in revi

Re: Devise macros to encapsulate (x & -x)

2023-11-22 Thread Nicola Vetrini
Jan, would you be willing to accept that other maintainers have a preference for having a single MACRO even if suboptimal? I can live with that, even if I'm surprised by this perspective that others take. How can we, in reviews, tell people to make sure arguments are evaluated only once, w

Re: Devise macros to encapsulate (x & -x)

2023-11-22 Thread Jan Beulich
On 22.11.2023 02:43, Stefano Stabellini wrote: > On Mon, 20 Nov 2023, Julien Grall wrote: >> On 18/11/2023 02:46, Stefano Stabellini wrote: >>> On Fri, 17 Nov 2023, Andrew Cooper wrote: On 17/11/2023 10:17 am, Nicola Vetrini wrote: > Hi all, > > As discussed in this thread [1], whi

Re: Devise macros to encapsulate (x & -x)

2023-11-21 Thread Stefano Stabellini
On Mon, 20 Nov 2023, Julien Grall wrote: > On 18/11/2023 02:46, Stefano Stabellini wrote: > > On Fri, 17 Nov 2023, Andrew Cooper wrote: > > > On 17/11/2023 10:17 am, Nicola Vetrini wrote: > > > > Hi all, > > > > > > > > As discussed in this thread [1], which is about complying with MISRA C > > > >

Re: Devise macros to encapsulate (x & -x)

2023-11-20 Thread Julien Grall
On 18/11/2023 02:46, Stefano Stabellini wrote: On Fri, 17 Nov 2023, Andrew Cooper wrote: On 17/11/2023 10:17 am, Nicola Vetrini wrote: Hi all, As discussed in this thread [1], which is about complying with MISRA C Rule 10.1, a macro was introduced to encapsulate a well-known construct: /*

Re: Devise macros to encapsulate (x & -x)

2023-11-17 Thread Stefano Stabellini
On Fri, 17 Nov 2023, Andrew Cooper wrote: > On 17/11/2023 10:17 am, Nicola Vetrini wrote: > > Hi all, > > > > As discussed in this thread [1], which is about complying with MISRA C > > Rule 10.1, > > a macro was introduced to encapsulate a well-known construct: > > > > /* > >  * Given an unsigned i

Re: Devise macros to encapsulate (x & -x)

2023-11-17 Thread Nicola Vetrini
On 2023-11-17 11:17, Nicola Vetrini wrote: Hi all, As discussed in this thread [1], which is about complying with MISRA C Rule 10.1, a macro was introduced to encapsulate a well-known construct: /* * Given an unsigned integer argument, expands to a mask where just the least * significant n

Re: Devise macros to encapsulate (x & -x)

2023-11-17 Thread Nicola Vetrini
On 2023-11-17 12:39, Jan Beulich wrote: On 17.11.2023 11:17, Nicola Vetrini wrote: Hi all, As discussed in this thread [1], which is about complying with MISRA C Rule 10.1, a macro was introduced to encapsulate a well-known construct: /* * Given an unsigned integer argument, expands to a mas

Re: Devise macros to encapsulate (x & -x)

2023-11-17 Thread Jan Beulich
On 17.11.2023 11:17, Nicola Vetrini wrote: > Hi all, > > As discussed in this thread [1], which is about complying with MISRA C > Rule 10.1, > a macro was introduced to encapsulate a well-known construct: > > /* > * Given an unsigned integer argument, expands to a mask where just the > least

Re: Devise macros to encapsulate (x & -x)

2023-11-17 Thread Jan Beulich
On 17.11.2023 12:15, Nicola Vetrini wrote: > On 2023-11-17 12:04, Andrew Cooper wrote: >> On 17/11/2023 10:17 am, Nicola Vetrini wrote: >>> Hi all, >>> >>> As discussed in this thread [1], which is about complying with MISRA C >>> Rule 10.1, >>> a macro was introduced to encapsulate a well-known co

Re: Devise macros to encapsulate (x & -x)

2023-11-17 Thread Nicola Vetrini
On 2023-11-17 12:04, Andrew Cooper wrote: On 17/11/2023 10:17 am, Nicola Vetrini wrote: Hi all, As discussed in this thread [1], which is about complying with MISRA C Rule 10.1, a macro was introduced to encapsulate a well-known construct: /*  * Given an unsigned integer argument, expands to a

Re: Devise macros to encapsulate (x & -x)

2023-11-17 Thread Andrew Cooper
On 17/11/2023 10:17 am, Nicola Vetrini wrote: > Hi all, > > As discussed in this thread [1], which is about complying with MISRA C > Rule 10.1, > a macro was introduced to encapsulate a well-known construct: > > /* >  * Given an unsigned integer argument, expands to a mask where just > the least >

Devise macros to encapsulate (x & -x)

2023-11-17 Thread Nicola Vetrini
Hi all, As discussed in this thread [1], which is about complying with MISRA C Rule 10.1, a macro was introduced to encapsulate a well-known construct: /* * Given an unsigned integer argument, expands to a mask where just the least * significant nonzero bit of the argument is set, or 0 if n