Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4212AC25B78 for ; Tue, 28 May 2024 20:40:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.731305.1136748 (Exim 4.92) (envelope-from ) id 1sC3c1-0005Xk-Vh; Tue, 28 May 2024 20:40:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 731305.1136748; Tue, 28 May 2024 20:40:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sC3c1-0005Xd-Re; Tue, 28 May 2024 20:40:01 +0000 Received: by outflank-mailman (input) for mailman id 731305; Tue, 28 May 2024 20:40:00 +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 1sC3c0-0005QA-G0 for xen-devel@lists.xenproject.org; Tue, 28 May 2024 20:40:00 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 730cbdbc-1d32-11ef-90a1-e314d9c70b13; Tue, 28 May 2024 22:39:59 +0200 (CEST) Received: from support.bugseng.com (support.bugseng.com [162.55.131.47]) by support.bugseng.com (Postfix) with ESMTPA id 6A2014EE073F; Tue, 28 May 2024 22:39:58 +0200 (CEST) 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: 730cbdbc-1d32-11ef-90a1-e314d9c70b13 MIME-Version: 1.0 Date: Tue, 28 May 2024 22:39:58 +0200 From: Nicola Vetrini To: Jan Beulich Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , xen-devel@lists.xenproject.org Subject: Re: [XEN PATCH 3/4] x86: address violations of MISRA C Rule 8.4 In-Reply-To: References: Message-ID: <7f39c844e1c781504ef71fecbd086009@bugseng.com> X-Sender: nicola.vetrini@bugseng.com Organization: BUGSENG s.r.l. Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit On 2024-05-28 08:28, Jan Beulich wrote: > On 27.05.2024 16:53, Nicola Vetrini wrote: >> Rule 8.4 states: "A compatible declaration shall be visible when >> an object or function with external linkage is defined." >> >> These variables are only referenced from asm modules, so they >> need to be extern and there is negligible risk of them being >> used improperly without noticing. > > "asm modules" isn't quite correct, as there's one use from inline > assembly. I have to admit I have no good wording suggestion other than > explicitly covering both: "asm modules or inline assembly". Yet that > then is ambiguous, as a use in inline assembly may also mean that > symbol is actually visible to the compiler by being mentioned as on of > the operands. Better ideas? > Maybe generically "asm code" or just "asm"? It's not really relevant whether it's inline or not, as far as I understand. >> As a result, they can be exempted using a comment-based deviation. >> No functional change. >> >> Signed-off-by: Nicola Vetrini > > With suitably adjusted wording: > Acked-by: Jan Beulich > > Jan -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)