[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v3 14/16] xen/x86: address violations of MISRA C:2012 Directive 4.10



On Tue, 12 Mar 2024, Jan Beulich wrote:
> On 11.03.2024 09:59, Simone Ballarin wrote:
> > From: Maria Celeste Cesario <maria.celeste.cesario@xxxxxxxxxxx>
> > 
> > Edit inclusion guards to address violations of
> > MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order to
> > prevent the contents of a header file being included more than once").
> > Mechanical change.
> 
> The changes all follow a single pattern, yet I'm afraid I can't bring
> this pattern in line with this description. To take ...
> 
> > --- a/xen/arch/x86/include/asm/domain.h
> > +++ b/xen/arch/x86/include/asm/domain.h
> > @@ -1,5 +1,5 @@
> > -#ifndef __ASM_DOMAIN_H__
> > -#define __ASM_DOMAIN_H__
> > +#ifndef ASM_X86_DOMAIN_H
> > +#define ASM_X86_DOMAIN_H
> >  
> >  #include <xen/mm.h>
> >  #include <xen/radix-tree.h>
> > @@ -780,7 +780,7 @@ struct arch_vcpu_io {
> >  /* Maxphysaddr supportable by the paging infrastructure. */
> >  unsigned int domain_max_paddr_bits(const struct domain *d);
> >  
> > -#endif /* __ASM_DOMAIN_H__ */
> > +#endif /* ASM_X86_DOMAIN_H */
> 
> ... this as example - what's the violation here? The existing symbol
> provides the intended effect, doesn't it? What it does not is adhere
> to the new naming scheme, but there's no mention of that in the
> description.

I think the commit message is incorrect. As you pointed out there is no
underlying MISRA issue. However, it does bring the headers inline with
the new naming scheme, which I think it is a great improvement.

With the commit message improved:

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.