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 <ler...@redhat.com>
> Cc: Jian J Wang <jian.j.w...@intel.com>
> Cc: Hao Wu <hao.a...@intel.com>
> Cc: Ray Ni <ray...@intel.com>
> Cc: Star Zeng <star.z...@intel.com>
> Cc: Michael D Kinney <michael.d.kin...@intel.com>
> Cc: Liming Gao <liming....@intel.com>
> Cc: Dandan Bi <dandan...@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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to