All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simone Ballarin <simone.ballarin@bugseng.com>
To: xen-devel@lists.xenproject.org
Cc: consulting@bugseng.com,
	Maria Celeste Cesario <maria.celeste.cesario@bugseng.com>,
	Shawn Anastasio <sanastasio@raptorengineering.com>,
	Simone Ballarin <simone.ballarin@bugseng.com>
Subject: [PATCH 6/9] xen/ppc: address violations of MISRA C:2012 Rule 11.8.
Date: Thu, 14 Dec 2023 13:07:48 +0100	[thread overview]
Message-ID: <0dcaf3a85f3293168b993c42303dfd55684a7bb7.1702555387.git.maria.celeste.cesario@bugseng.com> (raw)
In-Reply-To: <cover.1702555386.git.maria.celeste.cesario@bugseng.com>

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>
---
Adaptation requested by the community to make the code more consistent.
---
 xen/arch/ppc/include/asm/atomic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
2.40.0



  parent reply	other threads:[~2023-12-14 12:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 12:07 [PATCH 0/9] xen: address violations of MISRA C:2012 Rule 11.8 Simone Ballarin
2023-12-14 12:07 ` [PATCH 1/9] xen/arm64: " Simone Ballarin
2023-12-14 21:38   ` Stefano Stabellini
2023-12-14 12:07 ` [PATCH 2/9] xen/arm: " Simone Ballarin
2023-12-14 21:42   ` Stefano Stabellini
2023-12-14 12:07 ` [PATCH 3/9] xen/efi: " Simone Ballarin
2023-12-14 16:32   ` Jan Beulich
2023-12-18 14:32     ` Simone Ballarin
2023-12-14 21:45   ` Stefano Stabellini
2023-12-14 12:07 ` [PATCH 4/9] ACPI: " Simone Ballarin
2023-12-14 16:36   ` Jan Beulich
2023-12-18 15:05     ` Simone Ballarin
2023-12-14 21:49   ` Stefano Stabellini
2023-12-14 12:07 ` [PATCH 5/9] xen/x86: " Simone Ballarin
2023-12-14 16:41   ` Jan Beulich
2023-12-14 21:50   ` Stefano Stabellini
2023-12-14 12:07 ` Simone Ballarin [this message]
2023-12-14 21:51   ` [PATCH 6/9] xen/ppc: " Stefano Stabellini
2023-12-14 12:07 ` [PATCH 7/9] x86/hvm: " Simone Ballarin
2023-12-14 16:43   ` Jan Beulich
2023-12-14 21:52   ` Stefano Stabellini
2023-12-14 12:07 ` [PATCH 8/9] xen: add deviations for " Simone Ballarin
2023-12-14 12:46   ` Jan Beulich
2023-12-14 12:07 ` [PATCH 9/9] xen: add SAF deviation for safe cast removal Simone Ballarin
2023-12-14 16:51   ` Jan Beulich
2023-12-14 22:04     ` Stefano Stabellini
2023-12-15  7:59       ` Jan Beulich
2023-12-15 21:02         ` Stefano Stabellini
2023-12-18  8:18           ` Jan Beulich
2023-12-19  1:23             ` Stefano Stabellini
2023-12-14 12:36 ` [PATCH 0/9] xen: address violations of MISRA C:2012 Rule 11.8 Jan Beulich
2023-12-18 14:28   ` Simone Ballarin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0dcaf3a85f3293168b993c42303dfd55684a7bb7.1702555387.git.maria.celeste.cesario@bugseng.com \
    --to=simone.ballarin@bugseng.com \
    --cc=consulting@bugseng.com \
    --cc=maria.celeste.cesario@bugseng.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.