From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Wed, 24 Apr 2019 04:16:09 -0700 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8E70F30BC74B; Wed, 24 Apr 2019 11:16:08 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-123.rdu2.redhat.com [10.10.120.123]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DFE31001E71; Wed, 24 Apr 2019 11:16:06 +0000 (UTC) Subject: Re: [PATCH V2 0/8] Decrease the name collisions To: Zhichao Gao , devel@edk2.groups.io Cc: Jian J Wang , Hao Wu , Ray Ni , Star Zeng , Michael D Kinney , Liming Gao , Dandan Bi References: <20190424045827.19348-1-zhichao.gao@intel.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 24 Apr 2019 13:16:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190424045827.19348-1-zhichao.gao@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 24 Apr 2019 11:16:08 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Zhichao, On 04/24/19 06:58, Zhichao Gao wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740 > > V1: > The DebugLib instances of DebugPortProtocol, ConOut and StdErr > use a global variable "mExitBootServicesEvent" which is in > conflict with the same variable in StatusCodeHandlerRuntimeDxe.inf. > That would cause a build error through GCC5. So change the > name to the "mDebugLibExitBootServicesEvent". > > V2: > Abandon v1. > Add a 'static' descriptor to the global variables that only > used in a single file to minimize the name collisions. > This is only for the varable named 'mExitBootServicesEvent'. I recommend a number of easy changes: (1) in all of the subject lines, please replace Decrease the name collisions with make mExitBootServicesEvent STATIC (The longest resultant subject line, "MdeModulePkg/StatusCodeHandlerRuntimeDxe: make mExitBootServicesEvent STATIC", will be 76 chars wide, but I think it's acceptable in this case -- there's simply no way to express what we do in fewer characters. I have thought of "hide mExitBootServicesEvent" too, but "hide" is ambiguous.) (2) In the commit messages, I suggest replacing "descriptor" with "storage-class specifier". (That's the term ISO C uses.) (3) Please spell it as "STATIC" in source code, not "static". For whatever reason, the edk2 coding style requires STATIC. (See "MdePkg/Include/Base.h".) (4) In the first three patches (the DebugLib instances), there is a blank line between "mPostEBS" and "mExitBootServicesEvent". For that reason, I think it's unnecessary to change the indentation of "mPostEBS", when you add STATIC to "mExitBootServicesEvent". Having stated those, I totally defer to the respective package owners on this series, as I don't co-maintain any of the affected packages. If they disagree with the above, I'm OK too. Thanks Laszlo > > Cc: Laszlo Ersek > Cc: Jian J Wang > Cc: Hao Wu > Cc: Ray Ni > Cc: Star Zeng > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Dandan Bi > > > Zhichao Gao (8): > MdePkg/UefiDebugLibConOut: Decrease the name collisions > MdePkg/UefiDebugLibDebugPortProtocol: Decrease the name collisions > MdePkg/UefiDebugLibStdErr: Decrease the name collisions > IntelFrameworkModulePkg: Decrease the name collisions > MdeModulePkg/FirmwarePerformanceDxe: Decrease the name collisions > IntelFsp2WrapperPkg/FspWrapperNotifyDxe: Decrease the name collisions > IntelFrameworkModulePkg: Decrease the name collisions > MdeModulePkg/StatusCodeHandlerRuntimeDxe: Decrease the name collisions > > .../SmmRuntimeDxeSupport.c | 2 +- > .../DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c | 2 +- > IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 2 +- > .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c | 2 +- > .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c | 2 +- > MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c | 4 ++-- > .../UefiDebugLibDebugPortProtocol/DebugLibConstructor.c | 4 ++-- > MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c | 4 ++-- > 8 files changed, 11 insertions(+), 11 deletions(-) >