From nobody Sun Nov 24 17:48:54 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 1717237062392580.3320345456158; Sat, 1 Jun 2024 03:17:42 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.734112.1140323 (Exim 4.92) (envelope-from ) id 1sDLnR-0006VJ-Av; Sat, 01 Jun 2024 10:17:09 +0000 Received: by outflank-mailman (output) from mailman id 734112.1140323; Sat, 01 Jun 2024 10:17: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 1sDLnR-0006VA-6X; Sat, 01 Jun 2024 10:17:09 +0000 Received: by outflank-mailman (input) for mailman id 734112; Sat, 01 Jun 2024 10:17:08 +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 1sDLnQ-0006UI-3u for xen-devel@lists.xenproject.org; Sat, 01 Jun 2024 10:17:08 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 184c05ed-2000-11ef-b4bb-af5377834399; Sat, 01 Jun 2024 12:17:05 +0200 (CEST) Received: from nico.bugseng.com (unknown [46.228.253.194]) by support.bugseng.com (Postfix) with ESMTPSA id D7E144EE074A; Sat, 1 Jun 2024 12:17:03 +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: 184c05ed-2000-11ef-b4bb-af5377834399 From: Nicola Vetrini To: nicola.vetrini@bugseng.com, xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [XEN PATCH 3/5] x86: deviate violation of MISRA C Rule 20.12 Date: Sat, 1 Jun 2024 12:16:54 +0200 Message-Id: <475daa82f5be77644b1f32ecd3f6e66ccd9ac904.1717236930.git.nicola.vetrini@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: 1717237062932100001 Content-Type: text/plain; charset="utf-8" MISRA C Rule 20.12 states: "A macro parameter used as an operand to the # or ## operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators". When the second parameter of GET_SET_SHARED is a macro and is used as both a regular parameter and for token pasting the rule deliberately violated. A SAF-x-safe comment is used to deviate the usage. No functional change. Signed-off-by: Nicola Vetrini --- xen/arch/x86/include/asm/shared.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/include/asm/shared.h b/xen/arch/x86/include/asm/s= hared.h index 60b67fa4b427..c26d4b2b3f0f 100644 --- a/xen/arch/x86/include/asm/shared.h +++ b/xen/arch/x86/include/asm/shared.h @@ -76,6 +76,7 @@ static inline void arch_set_##field(struct vcpu *v, = \ =20 GET_SET_SHARED(unsigned long, max_pfn) GET_SET_SHARED(xen_pfn_t, pfn_to_mfn_frame_list_list) +/* SAF-6-safe Rule 20.12: expansion of macro nmi_reason */ GET_SET_SHARED(unsigned long, nmi_reason) =20 GET_SET_VCPU(unsigned long, cr2) --=20 2.34.1