On 05/12/2025 11:49 am, Michal Orzel wrote:
> TRC_PV_HYPERCALL_V2_ARG_MASK represents unsigned type, so according to
> MISRA C R7.2. U suffix should be applied. Fix the violation.
>
> Signed-off-by: Michal Orzel <[email protected]>
> ---
>  xen/include/public/trace.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/include/public/trace.h b/xen/include/public/trace.h
> index 141efa0ea7b9..a7d7fb8c507f 100644
> --- a/xen/include/public/trace.h
> +++ b/xen/include/public/trace.h
> @@ -157,7 +157,7 @@
>   */
>  #define TRC_PV_HYPERCALL_V2_ARG_32(i) (0x1 << (20 + 2*(i)))
>  #define TRC_PV_HYPERCALL_V2_ARG_64(i) (0x2 << (20 + 2*(i)))
> -#define TRC_PV_HYPERCALL_V2_ARG_MASK  (0xfff00000)
> +#define TRC_PV_HYPERCALL_V2_ARG_MASK  (0xfff00000U)
>  
>  #define TRC_SHADOW_NOT_SHADOW                 (TRC_SHADOW +  1)
>  #define TRC_SHADOW_FAST_PROPAGATE             (TRC_SHADOW +  2)

Hmm.  Ideally we should use _AC() (or whatever monstrosity we call it in
the public headers), but this header contains C structs unguarded by
__ASSEMBL{ER,Y}__ so we don't need to be so careful.

Reviewed-by: Andrew Cooper <[email protected]> but if you're
changing it, you can drop the brackets too.

Reply via email to