From nobody Mon Feb 9 12:28:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1702555755697522.0157609053921; Thu, 14 Dec 2023 04:09:15 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.654524.1021515 (Exim 4.92) (envelope-from ) id 1rDkWJ-0001sB-Fj; Thu, 14 Dec 2023 12:08:51 +0000 Received: by outflank-mailman (output) from mailman id 654524.1021515; Thu, 14 Dec 2023 12:08:51 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rDkWJ-0001pJ-BU; Thu, 14 Dec 2023 12:08:51 +0000 Received: by outflank-mailman (input) for mailman id 654524; Thu, 14 Dec 2023 12:08:49 +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 1rDkWH-0000tI-KV for xen-devel@lists.xenproject.org; Thu, 14 Dec 2023 12:08:49 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8880a984-9a79-11ee-9b0f-b553b5be7939; Thu, 14 Dec 2023 13:08:46 +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 3360D4EE0747; Thu, 14 Dec 2023 13:08:46 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 8880a984-9a79-11ee-9b0f-b553b5be7939 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Maria Celeste Cesario , Jan Beulich , Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu , Simone Ballarin Subject: [PATCH 3/9] xen/efi: address violations of MISRA C:2012 Rule 11.8 Date: Thu, 14 Dec 2023 13:07:45 +0100 Message-Id: <4540a3850dae951dd6bc4f9b001c9816bde2e49e.1702555387.git.maria.celeste.cesario@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1702555757644100004 Content-Type: text/plain; charset="utf-8" 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". Add missing const qualifiers in casts. The variables are originally const-qualified. There's no reason to drop the qualifiers. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/common/efi/boot.c | 6 +++--- xen/common/version.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 6110819918..efbec00af9 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -1248,10 +1248,10 @@ static void __init efi_exit_boot(EFI_HANDLE ImageHa= ndle, EFI_SYSTEM_TABLE *Syste #endif =20 /* Adjust pointers into EFI. */ - efi_ct =3D (void *)efi_ct + DIRECTMAP_VIRT_START; - efi_rs =3D (void *)efi_rs + DIRECTMAP_VIRT_START; + efi_ct =3D (const void *)efi_ct + DIRECTMAP_VIRT_START; + efi_rs =3D (const void *)efi_rs + DIRECTMAP_VIRT_START; efi_memmap =3D (void *)efi_memmap + DIRECTMAP_VIRT_START; - efi_fw_vendor =3D (void *)efi_fw_vendor + DIRECTMAP_VIRT_START; + efi_fw_vendor =3D (const void *)efi_fw_vendor + DIRECTMAP_VIRT_START; } =20 /* SAF-1-safe */ diff --git a/xen/common/version.c b/xen/common/version.c index d320135208..6ac5a52700 100644 --- a/xen/common/version.c +++ b/xen/common/version.c @@ -178,7 +178,7 @@ void __init xen_build_init(void) if ( &n[1] >=3D __note_gnu_build_id_end ) return; =20 - sz =3D (void *)__note_gnu_build_id_end - (void *)n; + sz =3D (const void *)__note_gnu_build_id_end - (const void *)n; =20 rc =3D xen_build_id_check(n, sz, &build_id_p, &build_id_len); =20 --=20 2.40.0