> -----Original Message-----
> From: Laszlo Ersek [mailto:[email protected]]
> Sent: Wednesday, April 24, 2019 7:16 PM
> To: Gao, Zhichao <[email protected]>; [email protected]
> Cc: Wang, Jian J <[email protected]>; Wu, Hao A <[email protected]>;
> Ni, Ray <[email protected]>; Zeng, Star <[email protected]>; Kinney,
> Michael D <[email protected]>; Gao, Liming
> <[email protected]>; Bi, Dandan <[email protected]>
> 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 <[email protected]>
> > Cc: Jian J Wang <[email protected]>
> > Cc: Hao Wu <[email protected]>
> > Cc: Ray Ni <[email protected]>
> > Cc: Star Zeng <[email protected]>
> > Cc: Michael D Kinney <[email protected]>
> > Cc: Liming Gao <[email protected]>
> > Cc: Dandan Bi <[email protected]>
> >
> >
> > 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/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to