On Tue, Jun 20, 2023 at 12:34:52PM +0200, Simone Ballarin wrote:
> From: Gianluca Luparini <gianluca.lupar...@bugseng.com>
> 
> 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".
> 
> These violations are caused by the missing "u" or "U" suffix in unsigned 
> integer constants, such as:
> 
> xen/arch/x86/hvm/hypercall.c:132.17-132.26
> if ( (eax & 0x80000000) && is_viridian_domain(currd) )
> 
> The patches in this series achieve compliance for MISRA C:2012 Rule 7.2
> by adding the "U" suffix to explicitly state when an integer constant is
> represented in an unsigned type.

I wonder if there should be a patch to CODING_STYLE also as part of
the series?

I know it's in misra/rules.rst, but still it's something that could
easily be added to the CODING_STYLE, unlike other rules that are more
abstract.

We could also settle on whether to use lowercase or uppercase suffixes
uniformly.

Thanks, Roger.

Reply via email to