Re: [PATCH] bitmap: fix n__ signess

2023-10-16 Thread Jan Beulich
On 29.09.2023 23:13, Stefano Stabellini wrote: > [PATCH v2] bitmap: fix nbits signess > > To avoid potentially dangerous sign conversions in bitmap_switch, all > the callers of the bitmap_switch macro (which are all within bitmap.h) > should pass an unsigned int as first parameter. > > Signed-off

Re: [PATCH] bitmap: fix n__ signess

2023-09-29 Thread Elliott Mitchell
On Fri, Sep 29, 2023 at 02:13:59PM -0700, Stefano Stabellini wrote: > On Fri, 29 Sep 2023, Julien Grall wrote: > > On 29/09/2023 00:19, Stefano Stabellini wrote: > > > All callers of the bitmap_switch macro (which are all within bitmap.h) > > > pass an int as first parameter. Do not assign it to an

Re: [PATCH] bitmap: fix n__ signess

2023-09-29 Thread Stefano Stabellini
On Fri, 29 Sep 2023, Julien Grall wrote: > On 29/09/2023 00:19, Stefano Stabellini wrote: > > All callers of the bitmap_switch macro (which are all within bitmap.h) > > pass an int as first parameter. Do not assign it to an unsigned int > > potentially introducing errors. > > > > Signed-off-by: St

Re: [PATCH] bitmap: fix n__ signess

2023-09-29 Thread Elliott Mitchell
On Fri, Sep 29, 2023 at 08:24:37AM +0100, Julien Grall wrote: > Hi Stefano, > > On 29/09/2023 00:19, Stefano Stabellini wrote: > > All callers of the bitmap_switch macro (which are all within bitmap.h) > > pass an int as first parameter. Do not assign it to an unsigned int > > potentially introduc

Re: [PATCH] bitmap: fix n__ signess

2023-09-29 Thread Luca Fancellu
> On 29 Sep 2023, at 08:24, Julien Grall wrote: > > Hi Stefano, > > On 29/09/2023 00:19, Stefano Stabellini wrote: >> All callers of the bitmap_switch macro (which are all within bitmap.h) >> pass an int as first parameter. Do not assign it to an unsigned int >> potentially introducing errors

Re: [PATCH] bitmap: fix n__ signess

2023-09-29 Thread Julien Grall
Hi Stefano, On 29/09/2023 00:19, Stefano Stabellini wrote: All callers of the bitmap_switch macro (which are all within bitmap.h) pass an int as first parameter. Do not assign it to an unsigned int potentially introducing errors. Signed-off-by: Stefano Stabellini --- We could also have gone t

[PATCH] bitmap: fix n__ signess

2023-09-28 Thread Stefano Stabellini
All callers of the bitmap_switch macro (which are all within bitmap.h) pass an int as first parameter. Do not assign it to an unsigned int potentially introducing errors. Signed-off-by: Stefano Stabellini --- We could also have gone the other way and change all the callers and the callers' calle