Message ID | 0dcaf3a85f3293168b993c42303dfd55684a7bb7.1702555387.git.maria.celeste.cesario@bugseng.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xen: address violations of MISRA C:2012 Rule 11.8 | expand |
On Thu, 14 Dec 2023, Simone Ballarin wrote: > From: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com> > > The xen sources contain violations of MISRA C:2012 Rule 11.8 whose > headline states: > "A conversion shall not remove any const, volatile or _Atomic qualification > from the type pointed to by a pointer". > > Fix violation by adding missing const qualifier in cast. > > Signed-off-by: Maria Celeste Cesario <maria.celeste.cesario@bugseng.com> > Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
diff --git a/xen/arch/ppc/include/asm/atomic.h b/xen/arch/ppc/include/asm/atomic.h index 64168aa3f1..fe778579fb 100644 --- a/xen/arch/ppc/include/asm/atomic.h +++ b/xen/arch/ppc/include/asm/atomic.h @@ -16,7 +16,7 @@ static inline int atomic_read(const atomic_t *v) { - return *(volatile int *)&v->counter; + return *(const volatile int *)&v->counter; } static inline int _atomic_read(atomic_t v)