From nobody Mon Feb 9 17:07:14 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 1687773198077148.12496422698484; Mon, 26 Jun 2023 02:53:18 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.555387.867161 (Exim 4.92) (envelope-from ) id 1qDity-0002Ah-MS; Mon, 26 Jun 2023 09:52:54 +0000 Received: by outflank-mailman (output) from mailman id 555387.867161; Mon, 26 Jun 2023 09:52:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qDity-0002AW-I8; Mon, 26 Jun 2023 09:52:54 +0000 Received: by outflank-mailman (input) for mailman id 555387; Mon, 26 Jun 2023 09:52:51 +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 1qDitv-0000Ov-J4 for xen-devel@lists.xenproject.org; Mon, 26 Jun 2023 09:52:51 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 36049170-1407-11ee-8611-37d641c3527e; Mon, 26 Jun 2023 11:52:50 +0200 (CEST) Received: from Dell.bugseng.com (unknown [37.163.27.55]) by support.bugseng.com (Postfix) with ESMTPSA id 6EE0D4EE0742; Mon, 26 Jun 2023 11:52:48 +0200 (CEST) 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: 36049170-1407-11ee-8611-37d641c3527e From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk , Michal Orzel , Xenia Ragiadakou , Ayan Kumar Halder Subject: [XEN PATCH v3 6/6] xen/arm: change parameter names in replace_grant_host_mapping(). Date: Mon, 26 Jun 2023 11:52:18 +0200 Message-Id: <2c2b9b3c53e556945baab3dd387bf029e12434b6.1687771796.git.federico.serafini@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: 1687773199121100001 Content-Type: text/plain; charset="utf-8" In the current version of replace_grant_host_mapping() function, the declaration (correctly) uses the parameter names 'gpaddr' and 'new_gpaddr', while the definition uses the parameter names 'addr' and 'new_addr'. Change the parameter names of the definition to 'gpaddr' and 'new_gpaddr' so that it is clear what type of address is expected and violations of MISRA C:2012 Rule 8.3 are fixed. In both declaration and definition of function replace_grant_host_mapping() change the parameter name 'mfn' to 'frame', thus improving readability and keeping consistency with name used in create_grant_host_mapping(). Signed-off-by: Federico Serafini Reviewed-by: Julien Grall --- xen/arch/arm/include/asm/grant_table.h | 2 +- xen/arch/arm/mm.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/include/asm/grant_table.h b/xen/arch/arm/include/= asm/grant_table.h index 265e598e56..f2d115b97d 100644 --- a/xen/arch/arm/include/asm/grant_table.h +++ b/xen/arch/arm/include/asm/grant_table.h @@ -38,7 +38,7 @@ static inline bool gnttab_release_host_mappings(const str= uct domain *d) =20 int create_grant_host_mapping(unsigned long gpaddr, mfn_t frame, unsigned int flags, unsigned int cache_flags= ); -int replace_grant_host_mapping(unsigned long gpaddr, mfn_t mfn, +int replace_grant_host_mapping(unsigned long gpaddr, mfn_t frame, unsigned long new_gpaddr, unsigned int flag= s); =20 /* diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 2e9860a754..0a3e1f3b64 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -1600,17 +1600,17 @@ int create_grant_host_mapping(unsigned long gpaddr,= mfn_t frame, return GNTST_okay; } =20 -int replace_grant_host_mapping(unsigned long addr, mfn_t mfn, - unsigned long new_addr, unsigned int flags) +int replace_grant_host_mapping(unsigned long gpaddr, mfn_t frame, + unsigned long new_gpaddr, unsigned int flag= s) { - gfn_t gfn =3D gaddr_to_gfn(addr); + gfn_t gfn =3D gaddr_to_gfn(gpaddr); struct domain *d =3D current->domain; int rc; =20 - if ( new_addr !=3D 0 || (flags & GNTMAP_contains_pte) ) + if ( new_gpaddr !=3D 0 || (flags & GNTMAP_contains_pte) ) return GNTST_general_error; =20 - rc =3D guest_physmap_remove_page(d, gfn, mfn, 0); + rc =3D guest_physmap_remove_page(d, gfn, frame, 0); =20 return rc ? GNTST_general_error : GNTST_okay; } --=20 2.34.1