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 C7FF4C47077 for ; Tue, 16 Jan 2024 14:10:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.667785.1039387 (Exim 4.92) (envelope-from ) id 1rPk8z-0000kQ-9o; Tue, 16 Jan 2024 14:10:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 667785.1039387; Tue, 16 Jan 2024 14:10:21 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rPk8z-0000kJ-70; Tue, 16 Jan 2024 14:10:21 +0000 Received: by outflank-mailman (input) for mailman id 667785; Tue, 16 Jan 2024 14:10:20 +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 1rPk8y-0000kA-CD for xen-devel@lists.xenproject.org; Tue, 16 Jan 2024 14:10:20 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id f9663b4e-b478-11ee-9b0f-b553b5be7939; Tue, 16 Jan 2024 15:10:17 +0100 (CET) Received: from [192.168.1.229] (93-36-216-194.ip62.fastwebnet.it [93.36.216.194]) by support.bugseng.com (Postfix) with ESMTPSA id 1AE3D4EE073F; Tue, 16 Jan 2024 15:10:16 +0100 (CET) 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: f9663b4e-b478-11ee-9b0f-b553b5be7939 Message-ID: Date: Tue, 16 Jan 2024 15:10:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/cpuid: Change cpuid() from a macro to a static inline Content-Language: en-US, it To: Jan Beulich , Andrew Cooper Cc: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis , Michal Orzel , Roberto Bagnara , "consulting @ bugseng . com" , Xen-devel References: <20240116115838.560473-1-andrew.cooper3@citrix.com> <39debf73-14bf-40a6-8aff-adf086595581@suse.com> From: Federico Serafini Organization: BUGSENG srl In-Reply-To: <39debf73-14bf-40a6-8aff-adf086595581@suse.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 16/01/24 14:02, Jan Beulich wrote: > On 16.01.2024 12:58, Andrew Cooper wrote: >> Fixes MISRA XXX > > Rule 5.5 if I'm not mistaken; had to look it up for the patch sent > earlier in the day. As to "fixes" - when it's not an actual bug, I had > (successfully) asked the bugseng guys to avoid that term, and instead > use "addresses" or "eliminates a ... violation" or some such. > >> No functional change. >> >> Signed-off-by: Andrew Cooper > > Reviewed-by: Jan Beulich > > Jan I confirm that it is Rule 5.5. I would like to point out that although the patch fixes violations of Rule 5.5, it introduces new violations of Rule 5.3 "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope": cpuid is used also as an identifier for some formal arguments (the pipeline does not fail because Rule 5.3 is not tagged as "clean" and the introduction of new violations does not cause a failure). A solution could be to rename the function adding a prefix or a suffix to its name. -- Federico Serafini, M.Sc. Software Engineer, BUGSENG (http://bugseng.com)