public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH V3 0/8] make mExitBootServicesEvent static
@ 2019-04-26  1:03 Gao, Zhichao
  2019-04-26  1:03 ` [PATCH V3 1/8] MdePkg/UefiDebugLibConOut: make global variable static Gao, Zhichao
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:03 UTC (permalink / raw)
  To: devel
  Cc: Laszlo Ersek, Jian J Wang, Hao Wu, Ray Ni, Star Zeng,
	Michael D Kinney, Liming Gao, Dandan Bi

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 variable named 'mExitBootServicesEvent'.

V3:
Update the commit message and some copyright date.

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: make global variable static
  MdePkg/UefiDebugLibDebugPortProtocol: make global variable static
  MdePkg/UefiDebugLibStdErr: make global variable static
  IntelFrameworkModulePkg: make global variable static
  MdeModulePkg/FirmwarePerformanceDxe: make global variable static
  IntelFsp2WrapperPkg/FspWrapperNotifyDxe: make global variable static
  IntelFrameworkModulePkg: make global variable static
  MdeModulePkg/StatusCodeHandlerRuntimeDxe: make global variable static

 .../SmmRuntimeDxeSupport.c                                    | 4 ++--
 .../DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c | 4 ++--
 IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 4 ++--
 .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4 ++--
 .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c                  | 4 ++--
 MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c       | 2 +-
 .../UefiDebugLibDebugPortProtocol/DebugLibConstructor.c       | 2 +-
 MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c       | 2 +-
 8 files changed, 13 insertions(+), 13 deletions(-)

-- 
2.21.0.windows.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH V3 1/8] MdePkg/UefiDebugLibConOut: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
@ 2019-04-26  1:03 ` Gao, Zhichao
  2019-04-26  1:03 ` [PATCH V3 2/8] MdePkg/UefiDebugLibDebugPortProtocol: " Gao, Zhichao
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:03 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Michael D Kinney, Liming Gao, Dandan Bi

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable named 'mExitBootServicesEvent'.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c b/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c
index d4fdfbab55..8005370372 100644
--- a/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c
+++ b/MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c
@@ -17,7 +17,7 @@
 //
 BOOLEAN     mPostEBS = FALSE;
 
-EFI_EVENT   mExitBootServicesEvent;
+static EFI_EVENT   mExitBootServicesEvent;
 
 //
 // Pointer to SystemTable
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH V3 2/8] MdePkg/UefiDebugLibDebugPortProtocol: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
  2019-04-26  1:03 ` [PATCH V3 1/8] MdePkg/UefiDebugLibConOut: make global variable static Gao, Zhichao
@ 2019-04-26  1:03 ` Gao, Zhichao
  2019-04-26  1:03 ` [PATCH V3 3/8] MdePkg/UefiDebugLibStdErr: " Gao, Zhichao
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:03 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Michael D Kinney, Liming Gao, Dandan Bi

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable named 'mExitBootServicesEvent'.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 .../Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c
index ed2cb70c21..de60d339a8 100644
--- a/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c
+++ b/MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c
@@ -17,7 +17,7 @@
 //
 BOOLEAN     mPostEBS = FALSE;
 
-EFI_EVENT   mExitBootServicesEvent;
+static EFI_EVENT   mExitBootServicesEvent;
 
 //
 // Pointer to SystemTable
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH V3 3/8] MdePkg/UefiDebugLibStdErr: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
  2019-04-26  1:03 ` [PATCH V3 1/8] MdePkg/UefiDebugLibConOut: make global variable static Gao, Zhichao
  2019-04-26  1:03 ` [PATCH V3 2/8] MdePkg/UefiDebugLibDebugPortProtocol: " Gao, Zhichao
@ 2019-04-26  1:03 ` Gao, Zhichao
  2019-04-26  1:04 ` [PATCH V3 4/8] IntelFrameworkModulePkg: " Gao, Zhichao
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:03 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Michael D Kinney, Liming Gao, Dandan Bi

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable named 'mExitBootServicesEvent'.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c b/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c
index d4fdfbab55..8005370372 100644
--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c
+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c
@@ -17,7 +17,7 @@
 //
 BOOLEAN     mPostEBS = FALSE;
 
-EFI_EVENT   mExitBootServicesEvent;
+static EFI_EVENT   mExitBootServicesEvent;
 
 //
 // Pointer to SystemTable
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH V3 4/8] IntelFrameworkModulePkg: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
                   ` (2 preceding siblings ...)
  2019-04-26  1:03 ` [PATCH V3 3/8] MdePkg/UefiDebugLibStdErr: " Gao, Zhichao
@ 2019-04-26  1:04 ` Gao, Zhichao
  2019-04-26  1:04 ` [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: " Gao, Zhichao
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:04 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Michael D Kinney, Liming Gao, Dandan Bi

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable named 'mExitBootServicesEvent'.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 .../DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c b/IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c
index 0f9185144d..5a82b99d09 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c
@@ -2,14 +2,14 @@
   Status Code Handler Driver which produces datahub handler and hook it
   onto the DXE status code router.
 
-  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #include "DatahubStatusCodeHandlerDxe.h"
 
-EFI_EVENT                 mExitBootServicesEvent     = NULL;
+static EFI_EVENT          mExitBootServicesEvent     = NULL;
 EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
 
 /**
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
                   ` (3 preceding siblings ...)
  2019-04-26  1:04 ` [PATCH V3 4/8] IntelFrameworkModulePkg: " Gao, Zhichao
@ 2019-04-26  1:04 ` Gao, Zhichao
  2019-04-26  5:58   ` [edk2-devel] " Wu, Hao A
  2019-04-26  1:04 ` [PATCH V3 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: " Gao, Zhichao
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:04 UTC (permalink / raw)
  To: devel
  Cc: Laszlo Ersek, Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao,
	Dandan Bi

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable 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: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
index 9713048f1f..61a7704b37 100644
--- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
+++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c
@@ -5,7 +5,7 @@
   for Firmware Basic Boot Performance Record and other boot performance records,
   and install FPDT to ACPI table.
 
-  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -40,7 +40,7 @@ EFI_RSC_HANDLER_PROTOCOL    *mRscHandlerProtocol = NULL;
 BOOLEAN                     mLockBoxReady = FALSE;
 EFI_EVENT                   mReadyToBootEvent;
 EFI_EVENT                   mLegacyBootEvent;
-EFI_EVENT                   mExitBootServicesEvent;
+static EFI_EVENT            mExitBootServicesEvent;
 UINTN                       mFirmwarePerformanceTableTemplateKey  = 0;
 BOOLEAN                     mDxeCoreReportStatusCodeEnable = FALSE;
 
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH V3 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
                   ` (4 preceding siblings ...)
  2019-04-26  1:04 ` [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: " Gao, Zhichao
@ 2019-04-26  1:04 ` Gao, Zhichao
  2019-04-26  1:36   ` Chiu, Chasel
  2019-04-26  1:04 ` [PATCH V3 7/8] IntelFrameworkModulePkg: " Gao, Zhichao
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:04 UTC (permalink / raw)
  To: devel
  Cc: Laszlo Ersek, Michael D Kinney, Liming Gao, Dandan Bi,
	Chasel Chiu, Nate DeSimone

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable named 'mExitBootServicesEvent'.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
index fe344a5327..0af0ec778c 100644
--- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
+++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
@@ -1,7 +1,7 @@
 /** @file
   This driver will register two callbacks to call fsp's notifies.
 
-  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -39,7 +39,7 @@ extern EFI_GUID gAddPerfRecordProtocolGuid;
 extern EFI_GUID gFspHobGuid;
 extern EFI_GUID gFspApiPerformanceGuid;
 
-EFI_EVENT mExitBootServicesEvent     = NULL;
+static EFI_EVENT mExitBootServicesEvent     = NULL;
 
 /**
   Relocate this image under 4G memory.
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH V3 7/8] IntelFrameworkModulePkg: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
                   ` (5 preceding siblings ...)
  2019-04-26  1:04 ` [PATCH V3 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: " Gao, Zhichao
@ 2019-04-26  1:04 ` Gao, Zhichao
  2019-04-26  1:04 ` [PATCH V3 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: " Gao, Zhichao
  2019-04-26 19:37 ` [PATCH V3 0/8] make mExitBootServicesEvent static Laszlo Ersek
  8 siblings, 0 replies; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:04 UTC (permalink / raw)
  To: devel; +Cc: Laszlo Ersek, Michael D Kinney, Liming Gao, Dandan Bi

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable named 'mExitBootServicesEvent'.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 .../SmmRuntimeDxeSupport.c                                    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c b/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c
index 4a6137a509..7dce1d2ee7 100644
--- a/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c
+++ b/IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeSupport.c
@@ -1,7 +1,7 @@
 /** @file
   Library constructor & destructor, event handlers, and other internal worker functions.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -9,7 +9,7 @@
 #include "ReportStatusCodeLibInternal.h"
 
 EFI_EVENT                     mVirtualAddressChangeEvent;
-EFI_EVENT                     mExitBootServicesEvent;
+static EFI_EVENT              mExitBootServicesEvent;
 EFI_STATUS_CODE_DATA          *mStatusCodeData;
 BOOLEAN                       mInSmm;
 EFI_SMM_BASE_PROTOCOL         *mSmmBase;
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH V3 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: make global variable static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
                   ` (6 preceding siblings ...)
  2019-04-26  1:04 ` [PATCH V3 7/8] IntelFrameworkModulePkg: " Gao, Zhichao
@ 2019-04-26  1:04 ` Gao, Zhichao
  2019-04-26  6:00   ` Wu, Hao A
  2019-04-26 19:37 ` [PATCH V3 0/8] make mExitBootServicesEvent static Laszlo Ersek
  8 siblings, 1 reply; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  1:04 UTC (permalink / raw)
  To: devel
  Cc: Laszlo Ersek, Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Liming Gao,
	Dandan Bi

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740

Add a 'static' storage-class specifier to the global variables
that only used in a single file to minimize the name collisions.
This is only for the variable 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: Liming Gao <liming.gao@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
---
 .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c                  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c
index 0d327d40e3..79cc48fa55 100644
--- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c
+++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c
@@ -2,7 +2,7 @@
   Status Code Handler Driver which produces general handlers and hook them
   onto the DXE status code router.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -10,7 +10,7 @@
 #include "StatusCodeHandlerRuntimeDxe.h"
 
 EFI_EVENT                 mVirtualAddressChangeEvent = NULL;
-EFI_EVENT                 mExitBootServicesEvent     = NULL;
+static EFI_EVENT          mExitBootServicesEvent     = NULL;
 EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
 
 /**
-- 
2.21.0.windows.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH V3 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: make global variable static
  2019-04-26  1:04 ` [PATCH V3 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: " Gao, Zhichao
@ 2019-04-26  1:36   ` Chiu, Chasel
  0 siblings, 0 replies; 17+ messages in thread
From: Chiu, Chasel @ 2019-04-26  1:36 UTC (permalink / raw)
  To: Gao, Zhichao, devel@edk2.groups.io
  Cc: Laszlo Ersek, Kinney, Michael D, Gao, Liming, Bi, Dandan,
	Desimone, Nathaniel L


Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>

> -----Original Message-----
> From: Gao, Zhichao
> Sent: Friday, April 26, 2019 9:04 AM
> To: devel@edk2.groups.io
> Cc: Laszlo Ersek <lersek@redhat.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Bi,
> Dandan <dandan.bi@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>;
> Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>
> Subject: [PATCH V3 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: make
> global variable static
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740
> 
> Add a 'static' storage-class specifier to the global variables that only used in a
> single file to minimize the name collisions.
> This is only for the variable named 'mExitBootServicesEvent'.
> 
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
> ---
>  IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> index fe344a5327..0af0ec778c 100644
> --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> @@ -1,7 +1,7 @@
>  /** @file
>    This driver will register two callbacks to call fsp's notifies.
> 
> -  Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2014 - 2019, Intel Corporation. All rights
> + reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -39,7 +39,7 @@ extern EFI_GUID gAddPerfRecordProtocolGuid;  extern
> EFI_GUID gFspHobGuid;  extern EFI_GUID gFspApiPerformanceGuid;
> 
> -EFI_EVENT mExitBootServicesEvent     = NULL;
> +static EFI_EVENT mExitBootServicesEvent     = NULL;
> 
>  /**
>    Relocate this image under 4G memory.
> --
> 2.21.0.windows.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [edk2-devel] [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: make global variable static
  2019-04-26  1:04 ` [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: " Gao, Zhichao
@ 2019-04-26  5:58   ` Wu, Hao A
  2019-04-26  8:11     ` Gao, Zhichao
  0 siblings, 1 reply; 17+ messages in thread
From: Wu, Hao A @ 2019-04-26  5:58 UTC (permalink / raw)
  To: devel@edk2.groups.io, Gao, Zhichao, Laszlo Ersek
  Cc: Laszlo Ersek, Wang, Jian J, Ni, Ray, Zeng, Star, Gao, Liming,
	Bi, Dandan

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gao,
> Zhichao
> Sent: Friday, April 26, 2019 9:04 AM
> To: devel@edk2.groups.io
> Cc: Laszlo Ersek; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao, Liming; Bi,
> Dandan
> Subject: [edk2-devel] [PATCH V3 5/8]
> MdeModulePkg/FirmwarePerformanceDxe: make global variable static

After checking Laszlo's comment on V2:

'''
(1) in all of the subject lines, please replace

  Decrease the name collisions

with

  make mExitBootServicesEvent STATIC
'''

I prefer the one suggested by Laszlo, the proposed subject here gives me
the feeling of changing all the global variables in the module.

However, I am okay if you stick with the proposed subject. Anyway,
Reviewed-by: Hao Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu

> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740
> 
> Add a 'static' storage-class specifier to the global variables
> that only used in a single file to minimize the name collisions.
> This is only for the variable 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: Liming Gao <liming.gao@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
>  .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firmwa
> rePerformanceDxe.c
> b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firmwa
> rePerformanceDxe.c
> index 9713048f1f..61a7704b37 100644
> ---
> a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firmwa
> rePerformanceDxe.c
> +++
> b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firmwa
> rePerformanceDxe.c
> @@ -5,7 +5,7 @@
>    for Firmware Basic Boot Performance Record and other boot performance
> records,
>    and install FPDT to ACPI table.
> 
> -  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -40,7 +40,7 @@ EFI_RSC_HANDLER_PROTOCOL    *mRscHandlerProtocol
> = NULL;
>  BOOLEAN                     mLockBoxReady = FALSE;
>  EFI_EVENT                   mReadyToBootEvent;
>  EFI_EVENT                   mLegacyBootEvent;
> -EFI_EVENT                   mExitBootServicesEvent;
> +static EFI_EVENT            mExitBootServicesEvent;
>  UINTN                       mFirmwarePerformanceTableTemplateKey  = 0;
>  BOOLEAN                     mDxeCoreReportStatusCodeEnable = FALSE;
> 
> --
> 2.21.0.windows.1
> 
> 
> 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH V3 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: make global variable static
  2019-04-26  1:04 ` [PATCH V3 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: " Gao, Zhichao
@ 2019-04-26  6:00   ` Wu, Hao A
  0 siblings, 0 replies; 17+ messages in thread
From: Wu, Hao A @ 2019-04-26  6:00 UTC (permalink / raw)
  To: Gao, Zhichao, devel@edk2.groups.io, Laszlo Ersek
  Cc: Laszlo Ersek, Wang, Jian J, Ni, Ray, Zeng, Star, Gao, Liming,
	Bi, Dandan

> -----Original Message-----
> From: Gao, Zhichao
> Sent: Friday, April 26, 2019 9:04 AM
> To: devel@edk2.groups.io
> Cc: Laszlo Ersek; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao, Liming; Bi,
> Dandan
> Subject: [PATCH V3 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: make
> global variable static

Similar comment as patch 5/8. But I will leave the decision to you.
Reviewed-by: Hao Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu

> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740
> 
> Add a 'static' storage-class specifier to the global variables
> that only used in a single file to minimize the name collisions.
> This is only for the variable 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: Liming Gao <liming.gao@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> ---
>  .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c                  | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> index 0d327d40e3..79cc48fa55 100644
> ---
> a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> +++
> b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandl
> erRuntimeDxe.c
> @@ -2,7 +2,7 @@
>    Status Code Handler Driver which produces general handlers and hook them
>    onto the DXE status code router.
> 
> -  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> +  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -10,7 +10,7 @@
>  #include "StatusCodeHandlerRuntimeDxe.h"
> 
>  EFI_EVENT                 mVirtualAddressChangeEvent = NULL;
> -EFI_EVENT                 mExitBootServicesEvent     = NULL;
> +static EFI_EVENT          mExitBootServicesEvent     = NULL;
>  EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
> 
>  /**
> --
> 2.21.0.windows.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [edk2-devel] [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: make global variable static
  2019-04-26  5:58   ` [edk2-devel] " Wu, Hao A
@ 2019-04-26  8:11     ` Gao, Zhichao
  2019-04-26  8:30       ` Wu, Hao A
  0 siblings, 1 reply; 17+ messages in thread
From: Gao, Zhichao @ 2019-04-26  8:11 UTC (permalink / raw)
  To: Wu, Hao A, devel@edk2.groups.io, Laszlo Ersek
  Cc: Laszlo Ersek, Wang, Jian J, Ni, Ray, Zeng, Star, Gao, Liming,
	Bi, Dandan



> -----Original Message-----
> From: Wu, Hao A
> Sent: Friday, April 26, 2019 1:58 PM
> To: devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com>; Laszlo
> Ersek <lersek@redhat.com>
> Cc: Laszlo Ersek <lersek@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Bi, Dandan <dandan.bi@intel.com>
> Subject: RE: [edk2-devel] [PATCH V3 5/8]
> MdeModulePkg/FirmwarePerformanceDxe: make global variable static
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Gao, Zhichao
> > Sent: Friday, April 26, 2019 9:04 AM
> > To: devel@edk2.groups.io
> > Cc: Laszlo Ersek; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao,
> > Liming; Bi, Dandan
> > Subject: [edk2-devel] [PATCH V3 5/8]
> > MdeModulePkg/FirmwarePerformanceDxe: make global variable static
> 
> After checking Laszlo's comment on V2:
> 
> '''
> (1) in all of the subject lines, please replace
> 
>   Decrease the name collisions
> 
> with
> 
>   make mExitBootServicesEvent STATIC
> '''
> 
> I prefer the one suggested by Laszlo, the proposed subject here gives me
> the feeling of changing all the global variables in the module.
> 
> However, I am okay if you stick with the proposed subject. Anyway,
> Reviewed-by: Hao Wu <hao.a.wu@intel.com>

I want to use that subject too. But the actual variable name ' mExitBootServicesEvent' is too long. If the changed driver name is also long such as patch #5, then the subject would be out of size. And the actual changed global variable is mentioned in the commit message. That is why I didn't take Laszlo's suggestion.

Thanks,
Zhichao

> 
> Best Regards,
> Hao Wu
> 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740
> >
> > Add a 'static' storage-class specifier to the global variables that
> > only used in a single file to minimize the name collisions.
> > This is only for the variable 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: Liming Gao <liming.gao@intel.com>
> > Cc: Dandan Bi <dandan.bi@intel.com>
> > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> > ---
> >  .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4
> > ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> >
> a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> wa
> > rePerformanceDxe.c
> >
> b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> wa
> > rePerformanceDxe.c
> > index 9713048f1f..61a7704b37 100644
> > ---
> >
> a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> wa
> > rePerformanceDxe.c
> > +++
> >
> b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> wa
> > rePerformanceDxe.c
> > @@ -5,7 +5,7 @@
> >    for Firmware Basic Boot Performance Record and other boot
> > performance records,
> >    and install FPDT to ACPI table.
> >
> > -  Copyright (c) 2011 - 2018, Intel Corporation. All rights
> > reserved.<BR>
> > +  Copyright (c) 2011 - 2019, Intel Corporation. All rights
> > + reserved.<BR>
> >    SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >  **/
> > @@ -40,7 +40,7 @@ EFI_RSC_HANDLER_PROTOCOL
> *mRscHandlerProtocol
> > = NULL;
> >  BOOLEAN                     mLockBoxReady = FALSE;
> >  EFI_EVENT                   mReadyToBootEvent;
> >  EFI_EVENT                   mLegacyBootEvent;
> > -EFI_EVENT                   mExitBootServicesEvent;
> > +static EFI_EVENT            mExitBootServicesEvent;
> >  UINTN                       mFirmwarePerformanceTableTemplateKey  = 0;
> >  BOOLEAN                     mDxeCoreReportStatusCodeEnable = FALSE;
> >
> > --
> > 2.21.0.windows.1
> >
> >
> > 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [edk2-devel] [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: make global variable static
  2019-04-26  8:11     ` Gao, Zhichao
@ 2019-04-26  8:30       ` Wu, Hao A
  2019-04-26 19:37         ` Laszlo Ersek
  0 siblings, 1 reply; 17+ messages in thread
From: Wu, Hao A @ 2019-04-26  8:30 UTC (permalink / raw)
  To: Gao, Zhichao, devel@edk2.groups.io, Laszlo Ersek
  Cc: Laszlo Ersek, Wang, Jian J, Ni, Ray, Zeng, Star, Gao, Liming,
	Bi, Dandan

> -----Original Message-----
> From: Gao, Zhichao
> Sent: Friday, April 26, 2019 4:12 PM
> To: Wu, Hao A; devel@edk2.groups.io; Laszlo Ersek
> Cc: Laszlo Ersek; Wang, Jian J; Ni, Ray; Zeng, Star; Gao, Liming; Bi, Dandan
> Subject: RE: [edk2-devel] [PATCH V3 5/8]
> MdeModulePkg/FirmwarePerformanceDxe: make global variable static
> 
> 
> 
> > -----Original Message-----
> > From: Wu, Hao A
> > Sent: Friday, April 26, 2019 1:58 PM
> > To: devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com>; Laszlo
> > Ersek <lersek@redhat.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>;
> > Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Gao, Liming
> > <liming.gao@intel.com>; Bi, Dandan <dandan.bi@intel.com>
> > Subject: RE: [edk2-devel] [PATCH V3 5/8]
> > MdeModulePkg/FirmwarePerformanceDxe: make global variable static
> >
> > > -----Original Message-----
> > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > > Gao, Zhichao
> > > Sent: Friday, April 26, 2019 9:04 AM
> > > To: devel@edk2.groups.io
> > > Cc: Laszlo Ersek; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao,
> > > Liming; Bi, Dandan
> > > Subject: [edk2-devel] [PATCH V3 5/8]
> > > MdeModulePkg/FirmwarePerformanceDxe: make global variable static
> >
> > After checking Laszlo's comment on V2:
> >
> > '''
> > (1) in all of the subject lines, please replace
> >
> >   Decrease the name collisions
> >
> > with
> >
> >   make mExitBootServicesEvent STATIC
> > '''
> >
> > I prefer the one suggested by Laszlo, the proposed subject here gives me
> > the feeling of changing all the global variables in the module.
> >
> > However, I am okay if you stick with the proposed subject. Anyway,
> > Reviewed-by: Hao Wu <hao.a.wu@intel.com>
> 
> I want to use that subject too. But the actual variable name '
> mExitBootServicesEvent' is too long. If the changed driver name is also long
> such as patch #5, then the subject would be out of size. And the actual changed
> global variable is mentioned in the commit message. That is why I didn't take
> Laszlo's suggestion.

Got it.

Just my opinion, the 72 characters limit for subject can be violated in
special cases. And I believe this is one of the cases when keeping the
title short makes it misleading.

Best Regards,
Hao Wu

> 
> Thanks,
> Zhichao
> 
> >
> > Best Regards,
> > Hao Wu
> >
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740
> > >
> > > Add a 'static' storage-class specifier to the global variables that
> > > only used in a single file to minimize the name collisions.
> > > This is only for the variable 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: Liming Gao <liming.gao@intel.com>
> > > Cc: Dandan Bi <dandan.bi@intel.com>
> > > Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
> > > ---
> > >  .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4
> > > ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git
> > >
> > a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> > wa
> > > rePerformanceDxe.c
> > >
> > b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> > wa
> > > rePerformanceDxe.c
> > > index 9713048f1f..61a7704b37 100644
> > > ---
> > >
> > a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> > wa
> > > rePerformanceDxe.c
> > > +++
> > >
> > b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
> > wa
> > > rePerformanceDxe.c
> > > @@ -5,7 +5,7 @@
> > >    for Firmware Basic Boot Performance Record and other boot
> > > performance records,
> > >    and install FPDT to ACPI table.
> > >
> > > -  Copyright (c) 2011 - 2018, Intel Corporation. All rights
> > > reserved.<BR>
> > > +  Copyright (c) 2011 - 2019, Intel Corporation. All rights
> > > + reserved.<BR>
> > >    SPDX-License-Identifier: BSD-2-Clause-Patent
> > >
> > >  **/
> > > @@ -40,7 +40,7 @@ EFI_RSC_HANDLER_PROTOCOL
> > *mRscHandlerProtocol
> > > = NULL;
> > >  BOOLEAN                     mLockBoxReady = FALSE;
> > >  EFI_EVENT                   mReadyToBootEvent;
> > >  EFI_EVENT                   mLegacyBootEvent;
> > > -EFI_EVENT                   mExitBootServicesEvent;
> > > +static EFI_EVENT            mExitBootServicesEvent;
> > >  UINTN                       mFirmwarePerformanceTableTemplateKey  = 0;
> > >  BOOLEAN                     mDxeCoreReportStatusCodeEnable = FALSE;
> > >
> > > --
> > > 2.21.0.windows.1
> > >
> > >
> > > 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [edk2-devel] [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: make global variable static
  2019-04-26  8:30       ` Wu, Hao A
@ 2019-04-26 19:37         ` Laszlo Ersek
  0 siblings, 0 replies; 17+ messages in thread
From: Laszlo Ersek @ 2019-04-26 19:37 UTC (permalink / raw)
  To: Wu, Hao A, Gao, Zhichao, devel@edk2.groups.io
  Cc: Wang, Jian J, Ni, Ray, Zeng, Star, Gao, Liming, Bi, Dandan

On 04/26/19 10:30, Wu, Hao A wrote:
>> -----Original Message-----
>> From: Gao, Zhichao
>> Sent: Friday, April 26, 2019 4:12 PM
>> To: Wu, Hao A; devel@edk2.groups.io; Laszlo Ersek
>> Cc: Laszlo Ersek; Wang, Jian J; Ni, Ray; Zeng, Star; Gao, Liming; Bi, Dandan
>> Subject: RE: [edk2-devel] [PATCH V3 5/8]
>> MdeModulePkg/FirmwarePerformanceDxe: make global variable static
>>
>>
>>
>>> -----Original Message-----
>>> From: Wu, Hao A
>>> Sent: Friday, April 26, 2019 1:58 PM
>>> To: devel@edk2.groups.io; Gao, Zhichao <zhichao.gao@intel.com>; Laszlo
>>> Ersek <lersek@redhat.com>
>>> Cc: Laszlo Ersek <lersek@redhat.com>; Wang, Jian J <jian.j.wang@intel.com>;
>>> Ni, Ray <ray.ni@intel.com>; Zeng, Star <star.zeng@intel.com>; Gao, Liming
>>> <liming.gao@intel.com>; Bi, Dandan <dandan.bi@intel.com>
>>> Subject: RE: [edk2-devel] [PATCH V3 5/8]
>>> MdeModulePkg/FirmwarePerformanceDxe: make global variable static
>>>
>>>> -----Original Message-----
>>>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>>>> Gao, Zhichao
>>>> Sent: Friday, April 26, 2019 9:04 AM
>>>> To: devel@edk2.groups.io
>>>> Cc: Laszlo Ersek; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao,
>>>> Liming; Bi, Dandan
>>>> Subject: [edk2-devel] [PATCH V3 5/8]
>>>> MdeModulePkg/FirmwarePerformanceDxe: make global variable static
>>>
>>> After checking Laszlo's comment on V2:
>>>
>>> '''
>>> (1) in all of the subject lines, please replace
>>>
>>>   Decrease the name collisions
>>>
>>> with
>>>
>>>   make mExitBootServicesEvent STATIC
>>> '''
>>>
>>> I prefer the one suggested by Laszlo, the proposed subject here gives me
>>> the feeling of changing all the global variables in the module.
>>>
>>> However, I am okay if you stick with the proposed subject. Anyway,
>>> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
>>
>> I want to use that subject too. But the actual variable name '
>> mExitBootServicesEvent' is too long. If the changed driver name is also long
>> such as patch #5, then the subject would be out of size. And the actual changed
>> global variable is mentioned in the commit message. That is why I didn't take
>> Laszlo's suggestion.
> 
> Got it.
> 
> Just my opinion, the 72 characters limit for subject can be violated in
> special cases. And I believe this is one of the cases when keeping the
> title short makes it misleading.

I agree.

But, I think three versions of this patch series should be plenty :) So
I'm not requesting a repost.

Thanks
Laszlo

> 
> Best Regards,
> Hao Wu
> 
>>
>> Thanks,
>> Zhichao
>>
>>>
>>> Best Regards,
>>> Hao Wu
>>>
>>>>
>>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1740
>>>>
>>>> Add a 'static' storage-class specifier to the global variables that
>>>> only used in a single file to minimize the name collisions.
>>>> This is only for the variable 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: Liming Gao <liming.gao@intel.com>
>>>> Cc: Dandan Bi <dandan.bi@intel.com>
>>>> Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
>>>> ---
>>>>  .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4
>>>> ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git
>>>>
>>> a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
>>> wa
>>>> rePerformanceDxe.c
>>>>
>>> b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
>>> wa
>>>> rePerformanceDxe.c
>>>> index 9713048f1f..61a7704b37 100644
>>>> ---
>>>>
>>> a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
>>> wa
>>>> rePerformanceDxe.c
>>>> +++
>>>>
>>> b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/Firm
>>> wa
>>>> rePerformanceDxe.c
>>>> @@ -5,7 +5,7 @@
>>>>    for Firmware Basic Boot Performance Record and other boot
>>>> performance records,
>>>>    and install FPDT to ACPI table.
>>>>
>>>> -  Copyright (c) 2011 - 2018, Intel Corporation. All rights
>>>> reserved.<BR>
>>>> +  Copyright (c) 2011 - 2019, Intel Corporation. All rights
>>>> + reserved.<BR>
>>>>    SPDX-License-Identifier: BSD-2-Clause-Patent
>>>>
>>>>  **/
>>>> @@ -40,7 +40,7 @@ EFI_RSC_HANDLER_PROTOCOL
>>> *mRscHandlerProtocol
>>>> = NULL;
>>>>  BOOLEAN                     mLockBoxReady = FALSE;
>>>>  EFI_EVENT                   mReadyToBootEvent;
>>>>  EFI_EVENT                   mLegacyBootEvent;
>>>> -EFI_EVENT                   mExitBootServicesEvent;
>>>> +static EFI_EVENT            mExitBootServicesEvent;
>>>>  UINTN                       mFirmwarePerformanceTableTemplateKey  = 0;
>>>>  BOOLEAN                     mDxeCoreReportStatusCodeEnable = FALSE;
>>>>
>>>> --
>>>> 2.21.0.windows.1
>>>>
>>>>
>>>> 
> 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH V3 0/8] make mExitBootServicesEvent static
  2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
                   ` (7 preceding siblings ...)
  2019-04-26  1:04 ` [PATCH V3 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: " Gao, Zhichao
@ 2019-04-26 19:37 ` Laszlo Ersek
  2019-04-28  1:30   ` Liming Gao
  8 siblings, 1 reply; 17+ messages in thread
From: Laszlo Ersek @ 2019-04-26 19:37 UTC (permalink / raw)
  To: Zhichao Gao, devel
  Cc: Jian J Wang, Hao Wu, Ray Ni, Star Zeng, Michael D Kinney,
	Liming Gao, Dandan Bi

On 04/26/19 03:03, 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 variable named 'mExitBootServicesEvent'.
> 
> V3:
> Update the commit message and some copyright date.
> 
> 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: make global variable static
>   MdePkg/UefiDebugLibDebugPortProtocol: make global variable static
>   MdePkg/UefiDebugLibStdErr: make global variable static
>   IntelFrameworkModulePkg: make global variable static
>   MdeModulePkg/FirmwarePerformanceDxe: make global variable static
>   IntelFsp2WrapperPkg/FspWrapperNotifyDxe: make global variable static
>   IntelFrameworkModulePkg: make global variable static
>   MdeModulePkg/StatusCodeHandlerRuntimeDxe: make global variable static
> 
>  .../SmmRuntimeDxeSupport.c                                    | 4 ++--
>  .../DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c | 4 ++--
>  IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 4 ++--
>  .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4 ++--
>  .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c                  | 4 ++--
>  MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c       | 2 +-
>  .../UefiDebugLibDebugPortProtocol/DebugLibConstructor.c       | 2 +-
>  MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c       | 2 +-
>  8 files changed, 13 insertions(+), 13 deletions(-)
> 

series
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH V3 0/8] make mExitBootServicesEvent static
  2019-04-26 19:37 ` [PATCH V3 0/8] make mExitBootServicesEvent static Laszlo Ersek
@ 2019-04-28  1:30   ` Liming Gao
  0 siblings, 0 replies; 17+ messages in thread
From: Liming Gao @ 2019-04-28  1:30 UTC (permalink / raw)
  To: Laszlo Ersek, Gao, Zhichao, devel@edk2.groups.io
  Cc: Wang, Jian J, Wu, Hao A, Ni, Ray, Zeng, Star, Kinney, Michael D,
	Bi, Dandan

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Laszlo Ersek [mailto:lersek@redhat.com]
>Sent: Saturday, April 27, 2019 3:38 AM
>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 V3 0/8] make mExitBootServicesEvent static
>
>On 04/26/19 03:03, 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 variable named 'mExitBootServicesEvent'.
>>
>> V3:
>> Update the commit message and some copyright date.
>>
>> 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: make global variable static
>>   MdePkg/UefiDebugLibDebugPortProtocol: make global variable static
>>   MdePkg/UefiDebugLibStdErr: make global variable static
>>   IntelFrameworkModulePkg: make global variable static
>>   MdeModulePkg/FirmwarePerformanceDxe: make global variable static
>>   IntelFsp2WrapperPkg/FspWrapperNotifyDxe: make global variable static
>>   IntelFrameworkModulePkg: make global variable static
>>   MdeModulePkg/StatusCodeHandlerRuntimeDxe: make global variable
>static
>>
>>  .../SmmRuntimeDxeSupport.c                                    | 4 ++--
>>  .../DatahubStatusCodeHandlerDxe/DatahubStatusCodeHandlerDxe.c | 4
>++--
>>  IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c | 4
>++--
>>  .../FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c  | 4
>++--
>>  .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c                  | 4 ++--
>>  MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c       | 2 +-
>>  .../UefiDebugLibDebugPortProtocol/DebugLibConstructor.c       | 2 +-
>>  MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c       | 2 +-
>>  8 files changed, 13 insertions(+), 13 deletions(-)
>>
>
>series
>Reviewed-by: Laszlo Ersek <lersek@redhat.com>

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-04-28  1:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-26  1:03 [PATCH V3 0/8] make mExitBootServicesEvent static Gao, Zhichao
2019-04-26  1:03 ` [PATCH V3 1/8] MdePkg/UefiDebugLibConOut: make global variable static Gao, Zhichao
2019-04-26  1:03 ` [PATCH V3 2/8] MdePkg/UefiDebugLibDebugPortProtocol: " Gao, Zhichao
2019-04-26  1:03 ` [PATCH V3 3/8] MdePkg/UefiDebugLibStdErr: " Gao, Zhichao
2019-04-26  1:04 ` [PATCH V3 4/8] IntelFrameworkModulePkg: " Gao, Zhichao
2019-04-26  1:04 ` [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: " Gao, Zhichao
2019-04-26  5:58   ` [edk2-devel] " Wu, Hao A
2019-04-26  8:11     ` Gao, Zhichao
2019-04-26  8:30       ` Wu, Hao A
2019-04-26 19:37         ` Laszlo Ersek
2019-04-26  1:04 ` [PATCH V3 6/8] IntelFsp2WrapperPkg/FspWrapperNotifyDxe: " Gao, Zhichao
2019-04-26  1:36   ` Chiu, Chasel
2019-04-26  1:04 ` [PATCH V3 7/8] IntelFrameworkModulePkg: " Gao, Zhichao
2019-04-26  1:04 ` [PATCH V3 8/8] MdeModulePkg/StatusCodeHandlerRuntimeDxe: " Gao, Zhichao
2019-04-26  6:00   ` Wu, Hao A
2019-04-26 19:37 ` [PATCH V3 0/8] make mExitBootServicesEvent static Laszlo Ersek
2019-04-28  1:30   ` Liming Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox