From nobody Sat Feb 7 06:54:53 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 1695977901338603.5492702295337; Fri, 29 Sep 2023 01:58:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.610428.949821 (Exim 4.92) (envelope-from ) id 1qm9Ju-0008Dj-S2; Fri, 29 Sep 2023 08:57:58 +0000 Received: by outflank-mailman (output) from mailman id 610428.949821; Fri, 29 Sep 2023 08:57:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qm9Ju-0008DE-N3; Fri, 29 Sep 2023 08:57:58 +0000 Received: by outflank-mailman (input) for mailman id 610428; Fri, 29 Sep 2023 08:57:57 +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 1qm9Jt-0007un-9L for xen-devel@lists.xenproject.org; Fri, 29 Sep 2023 08:57:57 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 485340ee-5ea6-11ee-878b-cb3800f73035; Fri, 29 Sep 2023 10:57:56 +0200 (CEST) Received: from Dell.homenet.telecomitalia.it (host-87-11-204-216.retail.telecomitalia.it [87.11.204.216]) by support.bugseng.com (Postfix) with ESMTPSA id 287E54EE0C87; Fri, 29 Sep 2023 10:57:56 +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: 485340ee-5ea6-11ee-878b-cb3800f73035 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Henry Wang Subject: [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3 Date: Fri, 29 Sep 2023 10:56:16 +0200 Message-Id: <198577fa8876efc48a08a89b55fa5f95694b37c1.1695972930.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: 1695977901929100005 Content-Type: text/plain; charset="utf-8" Make function declaration and definition consistent. No functional change. Signed-off-by: Federico Serafini Acked-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/arch/x86/xstate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/xstate.c b/xen/arch/x86/xstate.c index f442610fc5..cf94761d05 100644 --- a/xen/arch/x86/xstate.c +++ b/xen/arch/x86/xstate.c @@ -54,16 +54,16 @@ static inline bool xsetbv(u32 index, u64 xfeatures) return lo !=3D 0; } =20 -bool set_xcr0(u64 val) +bool set_xcr0(u64 xfeatures) { uint64_t *this_xcr0 =3D &this_cpu(xcr0); =20 - if ( *this_xcr0 !=3D val ) + if ( *this_xcr0 !=3D xfeatures ) { - if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, val) ) + if ( !xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures) ) return false; =20 - *this_xcr0 =3D val; + *this_xcr0 =3D xfeatures; } =20 return true; --=20 2.34.1