[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH 02/13] AMD/IOMMU: fixed violations of MISRA C:2012 Rule 7.2
 
- To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
 
- From: Simone Ballarin <simone.ballarin@xxxxxxxxxxx>
 
- Date: Wed, 21 Jun 2023 11:38:51 +0200
 
- Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, 	Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, 	Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, 	"consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, Gianluca Luparini <gianluca.luparini@xxxxxxxxxxx>, 	Michal Orzel <michal.orzel@xxxxxxx>, Xenia Ragiadakou <Xenia.Ragiadakou@xxxxxxx>, 	Ayan Kumar <ayan.kumar.halder@xxxxxxx>, 	"xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
 
- Delivery-date: Wed, 21 Jun 2023 09:39:18 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
 
 On Tue, 20 Jun 2023, Luca Fancellu wrote: 
> > On 20 Jun 2023, at 13:39, Jan Beulich <jbeulich@xxxxxxxx> 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)))) 
> >>  
> >> /* IOMMU Capability */ 
> >> -#define PCI_CAP_ID_MASK 0x000000FF 
> >> +#define PCI_CAP_ID_MASK 0x000000FFU 
> >  
> > Seeing this and similar uses further down, I think there's a purely 
> > stylistic question to be resolved first (and hence I'm widening the To: 
> > list here): Do we want to allow either case of U to be used 
> > interchangeably, leaving the choice up to the patch author? 
>  
> Because you ask to the list, my personal opinion is that we might want to 
> have only capital U, so that it’s consistent across the codebase and we don’t 
> need to create too many rules for the developer, it stands out anyway as it can’t 
> be an hex digit 
 
I agree with Luca 
 
 I also agree with Luca. --  
 
    
     |