From patchwork Thu Dec 14 12:07:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simone Ballarin X-Patchwork-Id: 13492948 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E440BC4167D for ; Thu, 14 Dec 2023 12:09:01 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.654526.1021534 (Exim 4.92) (envelope-from ) id 1rDkWK-0002DQ-U5; Thu, 14 Dec 2023 12:08:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 654526.1021534; Thu, 14 Dec 2023 12:08:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rDkWK-0002Bh-FA; Thu, 14 Dec 2023 12:08:52 +0000 Received: by outflank-mailman (input) for mailman id 654526; Thu, 14 Dec 2023 12:08:50 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rDkWI-0000tI-KY for xen-devel@lists.xenproject.org; Thu, 14 Dec 2023 12:08:50 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 892a5a09-9a79-11ee-9b0f-b553b5be7939; Thu, 14 Dec 2023 13:08:48 +0100 (CET) Received: from beta.station (net-37-182-35-120.cust.vodafonedsl.it [37.182.35.120]) by support.bugseng.com (Postfix) with ESMTPSA id 7D10A4EE0C8F; Thu, 14 Dec 2023 13:08:47 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 892a5a09-9a79-11ee-9b0f-b553b5be7939 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Maria Celeste Cesario , Shawn Anastasio , Simone Ballarin Subject: [PATCH 6/9] xen/ppc: address violations of MISRA C:2012 Rule 11.8. Date: Thu, 14 Dec 2023 13:07:48 +0100 Message-Id: <0dcaf3a85f3293168b993c42303dfd55684a7bb7.1702555387.git.maria.celeste.cesario@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 From: Maria Celeste Cesario 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 Signed-off-by: Simone Ballarin Reviewed-by: Stefano Stabellini --- 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)