Re: [XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2

2023-06-21 Thread Simone Ballarin
Il giorno mar 20 giu 2023 alle ore 22:41 Stefano Stabellini < sstabell...@kernel.org> ha scritto: > On Tue, 20 Jun 2023, Luca Fancellu wrote: > > > On 20 Jun 2023, at 13:39, Jan Beulich wrote: > > > > > > On 20.06.2023 12:34, Simone Ballarin wrote: > > >> --- a/xen/drivers/passthrough/amd/iommu-d

Re: [XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Simone Ballarin wrote: > From: Gianluca Luparini > > The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline > states: > "A "u" or "U" suffix shall be applied to all integer constants that are > represented in an unsigned type". > > I propose to use "U"

Re: [XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Luca Fancellu wrote: > > On 20 Jun 2023, at 13:39, Jan Beulich wrote: > > > > On 20.06.2023 12:34, Simone Ballarin wrote: > >> --- a/xen/drivers/passthrough/amd/iommu-defs.h > >> +++ b/xen/drivers/passthrough/amd/iommu-defs.h > >> @@ -38,49 +38,49 @@ > >> ((uint64_t)(

Re: [XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Luca Fancellu
> On 20 Jun 2023, at 13:39, Jan Beulich wrote: > > On 20.06.2023 12:34, Simone Ballarin wrote: >> --- a/xen/drivers/passthrough/amd/iommu-defs.h >> +++ b/xen/drivers/passthrough/amd/iommu-defs.h >> @@ -38,49 +38,49 @@ >> ((uint64_t)(offset) << (12 + (PTE_PER_TABLE_SHIFT * ((level) - 1))

Re: [XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Jan Beulich
On 20.06.2023 12:34, Simone Ballarin wrote: > --- a/xen/drivers/passthrough/amd/iommu-defs.h > +++ b/xen/drivers/passthrough/amd/iommu-defs.h > @@ -38,49 +38,49 @@ > ((uint64_t)(offset) << (12 + (PTE_PER_TABLE_SHIFT * ((level) - 1 > > /* IOMMU Capability */ > -#define PCI_CAP_ID_MAS

[XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Simone Ballarin
From: Gianluca Luparini The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline states: "A "u" or "U" suffix shall be applied to all integer constants that are represented in an unsigned type". I propose to use "U" as a suffix to explicitly state when an integer constant i