> On 20 Jun 2023, at 14:59, Simone Ballarin <simone.balla...@bugseng.com> wrote:
> 
> Hi,
> 
> Il giorno mar 20 giu 2023 alle ore 15:20 Jan Beulich <jbeul...@suse.com> ha 
> scritto:
> On 20.06.2023 12:35, Simone Ballarin wrote:
> > --- a/xen/common/gunzip.c
> > +++ b/xen/common/gunzip.c
> > @@ -11,7 +11,7 @@ static unsigned char *__initdata window;
> >  static memptr __initdata free_mem_ptr;
> >  static memptr __initdata free_mem_end_ptr;
> >  
> > -#define WSIZE           0x80000000
> > +#define WSIZE           0x80000000U
> 
> This again is an imported file, which I'm not sure we want to touch like
> this. (Then again it's only a single line change.)
> 
> This file is not present in exclude-list.json, in any case, I can remove the 
> change.

Hi,

I think you can touch this file, yes for sure it was imported from somewhere, 
but
from what I can see it was adopted by Xen and its code style is the Xen 
codestyle.
Furthermore a previous commit, 21a41a6164305bbc66ff1e42ffc11301712f6d65,
had already fixed a MISRA violation.

>   
> > --- a/xen/lib/muldiv64.c
> > +++ b/xen/lib/muldiv64.c
> > @@ -27,7 +27,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)
> >      rh = (uint64_t)u.l.high * (uint64_t)b;
> >      rh += (rl >> 32);
> >      res.l.high = rh / c;
> > -    res.l.low = (((rh % c) << 32) + (rl & 0xffffffff)) / c;
> > +    res.l.low = (((rh % c) << 32) + (rl & 0xffffffffU)) / c;
> 
> This might be neater and more consistent with surrounding code if
> switched to (uint32_t)rl.
> 
> Jan
> 
> Ok.
> 
> -- 
> Simone Ballarin, M.Sc.
> 
> Field Application Engineer, BUGSENG (https://bugseng.com)


Reply via email to