From nobody Mon Mar 23 21:29:22 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; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1773997681912537.5400149565711; Fri, 20 Mar 2026 02:08:01 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1257869.1552124 (Exim 4.92) (envelope-from ) id 1w3Vpa-0006Cz-I4; Fri, 20 Mar 2026 09:07:46 +0000 Received: by outflank-mailman (output) from mailman id 1257869.1552124; Fri, 20 Mar 2026 09:07:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w3Vpa-0006Cp-EN; Fri, 20 Mar 2026 09:07:46 +0000 Received: by outflank-mailman (input) for mailman id 1257869; Fri, 20 Mar 2026 09:07:45 +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 1w3VpZ-0005zQ-UZ for xen-devel@lists.xenproject.org; Fri, 20 Mar 2026 09:07:45 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 4159f72e-243c-11f1-9ccf-f158ae23cfc8; Fri, 20 Mar 2026 10:07:44 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4FDDC1596; Fri, 20 Mar 2026 02:07:37 -0700 (PDT) Received: from C3HXLD123V.arm.com (unknown [10.57.84.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E422C3F778; Fri, 20 Mar 2026 02:07:41 -0700 (PDT) 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: 4159f72e-243c-11f1-9ccf-f158ae23cfc8 From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: Volodymyr Babchuk , Jens Wiklander , Stefano Stabellini , Julien Grall , Michal Orzel Subject: [PATCH 1/2] xen/arm: ffa: Fix local ffa_vm_count shadowing Date: Fri, 20 Mar 2026 10:07:21 +0100 Message-ID: <030d24e1776af7c2391c588bc696592a64a92c51.1773911799.git.bertrand.marquis@arm.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1773997683291158500 Content-Type: text/plain; charset="utf-8" ffa_handle_partition_info_get() declares a local variable named ffa_vm_count, which hides the global atomic ffa_vm_count declared in ffa_private.h. This triggered the ECLAIR Rule 5.3 finding "non-compliant local variable `ffa_vm_count'". Rename the local counters to vm_count and sp_count and update their uses. No functional changes. Signed-off-by: Bertrand Marquis Reviewed-by: Jens Wiklander Reviewed-by: Michal Orzel --- xen/arch/arm/tee/ffa_partinfo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/tee/ffa_partinfo.c b/xen/arch/arm/tee/ffa_partinf= o.c index 4580bd5edb65..ed28820502f8 100644 --- a/xen/arch/arm/tee/ffa_partinfo.c +++ b/xen/arch/arm/tee/ffa_partinfo.c @@ -346,7 +346,7 @@ void ffa_handle_partition_info_get(struct cpu_user_regs= *regs) uint32_t dst_size =3D 0; size_t buf_size; void *dst_buf, *end_buf; - uint32_t ffa_vm_count =3D 0, ffa_sp_count =3D 0; + uint32_t vm_count =3D 0, sp_count =3D 0; =20 ffa_uuid_set(&uuid, get_user_reg(regs, 1), @@ -380,7 +380,7 @@ void ffa_handle_partition_info_get(struct cpu_user_regs= *regs) =20 if ( ffa_fw_supports_fid(FFA_PARTITION_INFO_GET) ) { - ret =3D ffa_get_sp_count(uuid, &ffa_sp_count); + ret =3D ffa_get_sp_count(uuid, &sp_count); if ( ret ) goto out; } @@ -391,7 +391,7 @@ void ffa_handle_partition_info_get(struct cpu_user_regs= *regs) */ if ( ffa_uuid_is_nil(uuid) ) { - ffa_vm_count =3D get_ffa_vm_count(); + vm_count =3D get_ffa_vm_count(); =20 /* * Workaround for Linux FF-A Driver not accepting to have its = own @@ -401,7 +401,7 @@ void ffa_handle_partition_info_get(struct cpu_user_regs= *regs) * the requester endpoint information should be included or not */ if ( ACCESS_ONCE(ctx->guest_vers) < FFA_VERSION_1_2 ) - ffa_vm_count -=3D 1; + vm_count -=3D 1; } =20 goto out; @@ -429,14 +429,14 @@ void ffa_handle_partition_info_get(struct cpu_user_re= gs *regs) =20 if ( ffa_fw_supports_fid(FFA_PARTITION_INFO_GET) ) { - ret =3D ffa_get_sp_partinfo(uuid, &ffa_sp_count, &dst_buf, end_buf, + ret =3D ffa_get_sp_partinfo(uuid, &sp_count, &dst_buf, end_buf, dst_size); =20 if ( ret ) goto out_rx_release; } =20 - ret =3D ffa_get_vm_partinfo(uuid, 0, &ffa_vm_count, &dst_buf, end_buf, + ret =3D ffa_get_vm_partinfo(uuid, 0, &vm_count, &dst_buf, end_buf, dst_size); =20 out_rx_release: @@ -451,7 +451,7 @@ out: if ( flags || ACCESS_ONCE(ctx->guest_vers) =3D=3D FFA_VERSION_1_0 ) dst_size =3D 0; =20 - ffa_set_regs_success(regs, ffa_sp_count + ffa_vm_count, dst_size); + ffa_set_regs_success(regs, sp_count + vm_count, dst_size); } } =20 --=20 2.52.0