On Thu, 5 Oct 2023, Nicola Vetrini wrote: > The constant 0 is used as a null pointer constant, in > violation of MISRA C:2012 Rule 11.9, in builds with > CONFIG_DEBUG_LOCK_PROFILE defined. > > Signed-off-by: Nicola Vetrini <[email protected]>
Reviewed-by: Stefano Stabellini <[email protected]> > --- > Release builds should not be impacted by this > --- > xen/include/xen/spinlock.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/include/xen/spinlock.h b/xen/include/xen/spinlock.h > index e7a1c1aa8988..16d933ae7ebe 100644 > --- a/xen/include/xen/spinlock.h > +++ b/xen/include/xen/spinlock.h > @@ -94,7 +94,7 @@ struct lock_profile_qhead { > int32_t idx; /* index for printout */ > }; > > -#define _LOCK_PROFILE(name) { 0, #name, &name, 0, 0, 0, 0, 0 } > +#define _LOCK_PROFILE(name) { NULL, #name, &name, 0, 0, 0, 0, 0 } > #define _LOCK_PROFILE_PTR(name) > \ > static struct lock_profile * const __lock_profile_##name > \ > __used_section(".lockprofile.data") = > \ > -- > 2.34.1 >
