public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Zhichao" <zhichao.gao@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
	"devel@edk2.groups.io" <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
Date: Thu, 25 Apr 2019 07:00:20 +0000	[thread overview]
Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B7C41E4@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <f5874104-376f-e832-f376-c845ac18a8da@redhat.com>



> -----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(-)
> >


      reply	other threads:[~2019-04-25  7:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  4:58 [PATCH V2 0/8] Decrease the name collisions Gao, Zhichao
2019-04-24  4:58 ` [PATCH V2 1/8] MdePkg/UefiDebugLibConOut: " Gao, Zhichao
2019-04-24  4:58 ` [PATCH V2 2/8] MdePkg/UefiDebugLibDebugPortProtocol: " Gao, Zhichao
2019-04-24  4:58 ` [PATCH V2 3/8] MdePkg/UefiDebugLibStdErr: " Gao, Zhichao
2019-04-24  8:07   ` [edk2-devel] " Ard Biesheuvel
2019-04-24 16:59     ` Michael D Kinney
2019-04-24 17:09       ` Ard Biesheuvel
2019-04-24 17:31         ` Michael D Kinney
2019-04-24 17:51           ` Ard Biesheuvel
2019-10-15 11:20           ` Leif Lindholm
2019-04-26 16:49         ` Laszlo Ersek
2019-04-29 16:40           ` Michael D Kinney
2019-04-30  9:43             ` Laszlo Ersek
2019-04-24  4:58 ` [PATCH V2 4/8] IntelFrameworkModulePkg: " Gao, Zhichao
2019-04-24  4:58 ` [PATCH V2 5/8] MdeModulePkg/FirmwarePerformanceDxe: " Gao, Zhichao
2019-04-24  4:58 ` [PATCH V2 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: " Gao, Zhichao
2019-04-24  5:19   ` Chiu, Chasel
2019-04-24  5:27   ` Nate DeSimone
2019-04-24  4:58 ` [PATCH V2 7/8] IntelFrameworkModulePkg: " Gao, Zhichao
2019-04-24  4:58 ` [PATCH V2 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: " Gao, Zhichao
2019-04-24 11:16 ` [PATCH V2 0/8] " Laszlo Ersek
2019-04-25  7:00   ` Gao, Zhichao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CE959C139B4C44DBEA1810E3AA6F9000B7C41E4@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox