From nobody Wed May 22 01:41:34 2024 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 1700843433619831.8957448223035; Fri, 24 Nov 2023 08:30:33 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.640821.999534 (Exim 4.92) (envelope-from ) id 1r6Z4D-00018x-NQ; Fri, 24 Nov 2023 16:30:09 +0000 Received: by outflank-mailman (output) from mailman id 640821.999534; Fri, 24 Nov 2023 16:30:09 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6Z4D-00018q-Ku; Fri, 24 Nov 2023 16:30:09 +0000 Received: by outflank-mailman (input) for mailman id 640821; Fri, 24 Nov 2023 16:30:08 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6Z4C-00015K-Eg for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 16:30:08 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ba5f5af2-8ae6-11ee-98e2-6d05b1d4d9a1; Fri, 24 Nov 2023 17:30:07 +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 5D1244EE0740; Fri, 24 Nov 2023 17:30:06 +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: ba5f5af2-8ae6-11ee-98e2-6d05b1d4d9a1 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=20Pau=20Monn=C3=A9?= , Wei Liu , Simone Ballarin Subject: [PATCH 1/5] x86/platform_hypercall: address violations of MISRA C:2012 Rule 11.8 Date: Fri, 24 Nov 2023 17:29:15 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1700843435157100005 Content-Type: text/plain; charset="utf-8" From: Maria Celeste Cesario Add const qualifier in cast that unnecessarily removes it to comply with Rule 11.8. The variable info is declared with a const qualified type. No functional change. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin --- xen/arch/x86/platform_hypercall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hype= rcall.c index c1ab552c57..4dde71db27 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -364,7 +364,7 @@ ret_t do_platform_op( if ( length > info->edd_device_params.length ) length =3D info->edd_device_params.length; if ( copy_to_compat(op->u.firmware_info.u.disk_info.edd_params, - (u8 *)&info->edd_device_params, + (const uint8_t *)&info->edd_device_params, length) ) break; if ( copy_to_compat(op->u.firmware_info.u.disk_info.edd_params, --=20 2.40.0 From nobody Wed May 22 01:41:34 2024 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 1700843440099568.2903511688568; Fri, 24 Nov 2023 08:30:40 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.640822.999545 (Exim 4.92) (envelope-from ) id 1r6Z4E-0001OQ-W2; Fri, 24 Nov 2023 16:30:10 +0000 Received: by outflank-mailman (output) from mailman id 640822.999545; Fri, 24 Nov 2023 16:30:10 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6Z4E-0001OJ-T9; Fri, 24 Nov 2023 16:30:10 +0000 Received: by outflank-mailman (input) for mailman id 640822; Fri, 24 Nov 2023 16:30:09 +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 1r6Z4D-0000du-2z for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 16:30:09 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id bab67beb-8ae6-11ee-9b0e-b553b5be7939; Fri, 24 Nov 2023 17:30:07 +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 E8B374EE0C89; Fri, 24 Nov 2023 17:30:06 +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: bab67beb-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=20Pau=20Monn=C3=A9?= , Wei Liu , Simone Ballarin Subject: [PATCH 2/5] x86/boot/reloc: address violations of MISRA C:2012 Rule 11.8 Date: Fri, 24 Nov 2023 17:29:16 +0100 Message-Id: <0e82b0a844e6eb50860ba5c9a2fcdb3328bc374f.1700842832.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: 1700843441180100002 Content-Type: text/plain; charset="utf-8" From: Maria Celeste Cesario Add missing const qualifier in casting to comply with Rule 11.8. Argument tag is typically const qualified. No functional change. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin --- xen/arch/x86/boot/reloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/reloc.c b/xen/arch/x86/boot/reloc.c index e093b7389c..df0bc710a7 100644 --- a/xen/arch/x86/boot/reloc.c +++ b/xen/arch/x86/boot/reloc.c @@ -67,7 +67,7 @@ struct vesa_mode_info { }; #endif /* CONFIG_VIDEO */ =20 -#define get_mb2_data(tag, type, member) (((multiboot2_tag_##type##_t *)(= tag))->member) +#define get_mb2_data(tag, type, member) (((const multiboot2_tag_##type##= _t *)(tag))->member) #define get_mb2_string(tag, type, member) ((u32)get_mb2_data(tag, type, me= mber)) =20 static u32 alloc; --=20 2.40.0 From nobody Wed May 22 01:41:34 2024 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 1700843440886259.0362523724416; Fri, 24 Nov 2023 08:30:40 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.640824.999555 (Exim 4.92) (envelope-from ) id 1r6Z4F-0001Yh-Me; Fri, 24 Nov 2023 16:30:11 +0000 Received: by outflank-mailman (output) from mailman id 640824.999555; Fri, 24 Nov 2023 16:30:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6Z4F-0001Xc-Gi; Fri, 24 Nov 2023 16:30:11 +0000 Received: by outflank-mailman (input) for mailman id 640824; Fri, 24 Nov 2023 16:30:10 +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 1r6Z4E-0000du-3C for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 16:30:10 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id baffe575-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 810044EE0747; Fri, 24 Nov 2023 17:30:07 +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: baffe575-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 , Simone Ballarin Subject: [PATCH 3/5] AMD/IOMMU: address violations of MISRA C:2012 Rule 11.8 Date: Fri, 24 Nov 2023 17:29:17 +0100 Message-Id: <11fc193f35be188165294665b1e989b2db17a776.1700842832.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: 1700843441167100001 Content-Type: text/plain; charset="utf-8" From: Maria Celeste Cesario Add missing const qualifier in casting to comply with Rule 11.8. The type of the formal parameter ivhd_block is const qualified. No functional change. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin --- xen/drivers/passthrough/amd/iommu_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthr= ough/amd/iommu_acpi.c index 699d33f429..00923a6bb5 100644 --- a/xen/drivers/passthrough/amd/iommu_acpi.c +++ b/xen/drivers/passthrough/amd/iommu_acpi.c @@ -1232,7 +1232,7 @@ static int __init get_last_bdf_ivhd( while ( ivhd_block->header.length >=3D (block_length + sizeof(struct acpi_ivrs_de_header)) ) { - ivhd_device =3D (const void *)((u8 *)ivhd_block + block_length); + ivhd_device =3D (const void *)((const uint8_t *)ivhd_block + block= _length); =20 switch ( ivhd_device->header.type ) { --=20 2.40.0 From nobody Wed May 22 01:41:34 2024 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 1700843431585122.48493789714644; Fri, 24 Nov 2023 08:30:31 -0800 (PST) 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 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-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: 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=20Pau=20Monn=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 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1700843433507100003 Content-Type: text/plain; charset="utf-8" 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/a= tomic.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_ =3D read_u8_atomic((uint8_t *)(p)); break; \ - case 2: x_ =3D read_u16_atomic((uint16_t *)(p)); break; \ - case 4: x_ =3D read_u32_atomic((uint32_t *)(p)); break; \ - case 8: x_ =3D read_u64_atomic((uint64_t *)(p)); break; \ + case 1: x_ =3D read_u8_atomic((const uint8_t *)(p)); break; \ + case 2: x_ =3D read_u16_atomic((const uint16_t *)(p)); break; \ + case 4: x_ =3D read_u32_atomic((const uint32_t *)(p)); break; \ + case 8: x_ =3D read_u64_atomic((const uint64_t *)(p)); break; \ default: x_ =3D 0; __bad_atomic_size(); break; \ } \ CLANG_DISABLE_WARN_GCC_COMPAT_END \ --=20 2.40.0 From nobody Wed May 22 01:41:34 2024 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 1700843432350679.1823424696205; Fri, 24 Nov 2023 08:30:32 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.640823.999550 (Exim 4.92) (envelope-from ) id 1r6Z4F-0001Qm-CJ; Fri, 24 Nov 2023 16:30:11 +0000 Received: by outflank-mailman (output) from mailman id 640823.999550; Fri, 24 Nov 2023 16:30:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6Z4F-0001Q3-4P; Fri, 24 Nov 2023 16:30:11 +0000 Received: by outflank-mailman (input) for mailman id 640823; Fri, 24 Nov 2023 16:30:09 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r6Z4D-00015K-Px for xen-devel@lists.xenproject.org; Fri, 24 Nov 2023 16:30:09 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bbb43385-8ae6-11ee-98e2-6d05b1d4d9a1; Fri, 24 Nov 2023 17:30:09 +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 8B8CF4EE074E; Fri, 24 Nov 2023 17:30:08 +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: bbb43385-8ae6-11ee-98e2-6d05b1d4d9a1 From: Simone Ballarin To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, maria.celeste.cesario@bugseng.com, Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Volodymyr Babchuk , Simone Ballarin Subject: [PATCH 5/5] xen/arm: address violations of MISRA C:2012 Rule 11.8 Date: Fri, 24 Nov 2023 17:29:19 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1700843433361100001 Content-Type: text/plain; charset="utf-8" From: Maria Celeste Cesario Add or amend casts to comply with Rule 11.8. The violations are resolved either: - by adding a missing const qualifier in the cast - by removing a cast to non-const on a const-qualified object No functional change. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin --- xen/arch/arm/domain_build.c | 2 +- xen/arch/arm/include/asm/atomic.h | 2 +- xen/arch/arm/include/asm/regs.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 2dd2926b41..c17214f738 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2749,7 +2749,7 @@ static int __init handle_passthrough_prop(struct kern= el_info *kinfo, if ( node =3D=3D NULL ) { printk(XENLOG_ERR "Couldn't find node %s in host_dt!\n", - (char *)xen_path->data); + xen_path->data); return -EINVAL; } =20 diff --git a/xen/arch/arm/include/asm/atomic.h b/xen/arch/arm/include/asm/a= tomic.h index 64314d59b3..517216d2a8 100644 --- a/xen/arch/arm/include/asm/atomic.h +++ b/xen/arch/arm/include/asm/atomic.h @@ -154,7 +154,7 @@ static always_inline void write_atomic_size(volatile vo= id *p, */ static inline int atomic_read(const atomic_t *v) { - return *(volatile int *)&v->counter; + return *(const volatile int *)&v->counter; } =20 static inline int _atomic_read(atomic_t v) diff --git a/xen/arch/arm/include/asm/regs.h b/xen/arch/arm/include/asm/reg= s.h index 8a0db95415..79050937f3 100644 --- a/xen/arch/arm/include/asm/regs.h +++ b/xen/arch/arm/include/asm/regs.h @@ -48,7 +48,7 @@ static inline bool regs_mode_is_32bit(const struct cpu_us= er_regs *regs) =20 static inline bool guest_mode(const struct cpu_user_regs *r) { - unsigned long diff =3D (char *)guest_cpu_user_regs() - (char *)(r); + unsigned long diff =3D (char *)guest_cpu_user_regs() - (const char *)(= r); /* Frame pointer must point into current CPU stack. */ ASSERT(diff < STACK_SIZE); /* If not a guest frame, it must be a hypervisor frame. */ --=20 2.40.0