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 C591EEB64DD for ; Tue, 1 Aug 2023 07:24:22 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.573723.898691 (Exim 4.92) (envelope-from ) id 1qQjjq-00063I-8U; Tue, 01 Aug 2023 07:24:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 573723.898691; Tue, 01 Aug 2023 07:24:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qQjjq-00062l-5w; Tue, 01 Aug 2023 07:24:14 +0000 Received: by outflank-mailman (input) for mailman id 573723; Tue, 01 Aug 2023 07:24:12 +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 1qQjjo-00062e-Lk for xen-devel@lists.xenproject.org; Tue, 01 Aug 2023 07:24:12 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 6943176e-303c-11ee-b259-6b7b168915f2; Tue, 01 Aug 2023 09:24:11 +0200 (CEST) Received: from support.bugseng.com (support.bugseng.com [162.55.131.47]) by support.bugseng.com (Postfix) with ESMTPA id 59B7A4EE0737; Tue, 1 Aug 2023 09:24:11 +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: 6943176e-303c-11ee-b259-6b7b168915f2 MIME-Version: 1.0 Date: Tue, 01 Aug 2023 09:24:11 +0200 From: Nicola Vetrini To: Julien Grall Cc: xen-devel@lists.xenproject.org, sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Bertrand Marquis , Volodymyr Babchuk , "Daniel P. Smith" Subject: Re: [XEN PATCH 4/4] arm/efi: address MISRA C:2012 Rule 5.3 In-Reply-To: <8165e7b1-4eef-7b13-32f3-05ff38837100@xen.org> References: <8165e7b1-4eef-7b13-32f3-05ff38837100@xen.org> User-Agent: Roundcube Webmail/1.4.3 Message-ID: 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 31/07/2023 16:01, Julien Grall wrote: > Hi, > > On 31/07/2023 14:35, Nicola Vetrini wrote: >> Rule 5.3 has the following headline: >> "An identifier declared in an inner scope shall not hide an >> identifier declared in an outer scope" >> >> The parameter 'fdt' in static function within this file is removed, >> as they served no purpose and shadowed the homonymous variable. > > I am not convinced this is a good idea to keep 'fdt' as static > variable around because the name is too generic. Also in the future we > may be able to remove the global static variable. > > This means that most of this patch will be reverted. > > So as I wrote on Matrix, I would rather prefer if the global variable > is renamed to 'fdt_efi'. > > Cheers, Will do. Changing the parameters seemed less messy, but I'm fine either way, so I'll submit a v2 with that rename. -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)