.../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(-)
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'. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> 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(-) -- 2.21.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39445): https://edk2.groups.io/g/devel/message/39445 Mute This Topic: https://groups.io/mt/31318885/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
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 <lersek@redhat.com> > Cc: Jian J Wang <jian.j.wang@intel.com> > Cc: Hao Wu <hao.a.wu@intel.com> > Cc: Ray Ni <ray.ni@intel.com> > Cc: Star Zeng <star.zeng@intel.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Liming Gao <liming.gao@intel.com> > Cc: Dandan Bi <dandan.bi@intel.com> > > > 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(-) > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39485): https://edk2.groups.io/g/devel/message/39485 Mute This Topic: https://groups.io/mt/31318885/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
> -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Wednesday, April 24, 2019 7:16 PM > To: Gao, Zhichao <zhichao.gao@intel.com>; devel@edk2.groups.io > Cc: Wang, Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; > Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Kinney, > Michael D <michael.d.kinney@intel.com>; Gao, Liming > <liming.gao@intel.com>; Bi, Dandan <dandan.bi@intel.com> > Subject: Re: [PATCH V2 0/8] Decrease the name collisions > > 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.) Agree. That would be more specific for this patch. > > (2) In the commit messages, I suggest replacing "descriptor" with "storage- > class specifier". (That's the term ISO C uses.) Agree. > > (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".) Depend on the discuss between Mike and Ard. I'd like to keep using the static. Or wait for someone else have different opinions. > > (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". > That my personal habit to make the variables aligned if they are closed. Seems this is an unnecessary change. Thanks, Zhichao > > 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 <lersek@redhat.com> > > Cc: Jian J Wang <jian.j.wang@intel.com> > > Cc: Hao Wu <hao.a.wu@intel.com> > > Cc: Ray Ni <ray.ni@intel.com> > > Cc: Star Zeng <star.zeng@intel.com> > > Cc: Michael D Kinney <michael.d.kinney@intel.com> > > Cc: Liming Gao <liming.gao@intel.com> > > Cc: Dandan Bi <dandan.bi@intel.com> > > > > > > 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(-) > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39537): https://edk2.groups.io/g/devel/message/39537 Mute This Topic: https://groups.io/mt/31318885/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.