From patchwork Fri Nov 24 16:29:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simone Ballarin X-Patchwork-Id: 13467857 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 09E5EC61D97 for ; Fri, 24 Nov 2023 16:30:21 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.640825.999575 (Exim 4.92) (envelope-from ) id 1r6Z4G-00026c-VC; Fri, 24 Nov 2023 16:30:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 640825.999575; Fri, 24 Nov 2023 16:30:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6Z4G-00024o-OQ; Fri, 24 Nov 2023 16:30:12 +0000 Received: by outflank-mailman (input) for mailman id 640825; Fri, 24 Nov 2023 16:30:11 +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 1r6Z4F-0000du-3X for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 16:30:11 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bb561178-8ae6-11ee-9b0e-b553b5be7939; Fri, 24 Nov 2023 17:30:08 +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 003AA4EE0C8F; Fri, 24 Nov 2023 17:30:07 +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: bb561178-8ae6-11ee-9b0e-b553b5be7939 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, maria.celeste.cesario@bugseng.com, Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Simone Ballarin Subject: [PATCH 4/5] x86/atomic: address violations of MISRA C:2012 Rule 11.8 Date: Fri, 24 Nov 2023 17:29:18 +0100 Message-Id: <0224699e85baac395e47a1d5d89972d9d0284e85.1700842832.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 Edit casts that unnecessarily remove const qualifiers to comply with Rule 11.8. The type of the provided pointer may be const qualified. No functional change. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin --- xen/arch/x86/include/asm/atomic.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/include/asm/atomic.h b/xen/arch/x86/include/asm/atomic.h index 27aad43aaa..16bd0ebfd7 100644 --- a/xen/arch/x86/include/asm/atomic.h +++ b/xen/arch/x86/include/asm/atomic.h @@ -51,10 +51,10 @@ void __bad_atomic_size(void); unsigned long x_; \ CLANG_DISABLE_WARN_GCC_COMPAT_START \ switch ( sizeof(*(p)) ) { \ - case 1: x_ = read_u8_atomic((uint8_t *)(p)); break; \ - case 2: x_ = read_u16_atomic((uint16_t *)(p)); break; \ - case 4: x_ = read_u32_atomic((uint32_t *)(p)); break; \ - case 8: x_ = read_u64_atomic((uint64_t *)(p)); break; \ + case 1: x_ = read_u8_atomic((const uint8_t *)(p)); break; \ + case 2: x_ = read_u16_atomic((const uint16_t *)(p)); break; \ + case 4: x_ = read_u32_atomic((const uint32_t *)(p)); break; \ + case 8: x_ = read_u64_atomic((const uint64_t *)(p)); break; \ default: x_ = 0; __bad_atomic_size(); break; \ } \ CLANG_DISABLE_WARN_GCC_COMPAT_END \