From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: zhichao.gao@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Fri, 26 Apr 2019 01:11:38 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 01:11:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,396,1549958400"; d="scan'208";a="152529592" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 26 Apr 2019 01:11:37 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 26 Apr 2019 01:11:36 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 26 Apr 2019 01:11:36 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.25]) with mapi id 14.03.0415.000; Fri, 26 Apr 2019 16:11:34 +0800 From: "Gao, Zhichao" 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 Thread-Topic: [edk2-devel] [PATCH V3 5/8] MdeModulePkg/FirmwarePerformanceDxe: make global variable static Thread-Index: AQHU+8wQ7zpdQnh+BUiK+eiz05iRzKZN8QpQgAAkmMA= Date: Fri, 26 Apr 2019 08:11:34 +0000 Message-ID: <3CE959C139B4C44DBEA1810E3AA6F9000B7C4671@SHSMSX101.ccr.corp.intel.com> References: <20190426010404.20624-1-zhichao.gao@intel.com> <20190426010404.20624-6-zhichao.gao@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zhichao.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Wu, Hao A > Sent: Friday, April 26, 2019 1:58 PM > To: devel@edk2.groups.io; Gao, Zhichao ; Laszlo > Ersek > Cc: Laszlo Ersek ; Wang, Jian J ; > Ni, Ray ; Zeng, Star ; Gao, Limin= g > ; Bi, Dandan > Subject: RE: [edk2-devel] [PATCH V3 5/8] > MdeModulePkg/FirmwarePerformanceDxe: make global variable static >=20 > > -----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 >=20 > After checking Laszlo's comment on V2: >=20 > ''' > (1) in all of the subject lines, please replace >=20 > Decrease the name collisions >=20 > with >=20 > make mExitBootServicesEvent STATIC > ''' >=20 > I prefer the one suggested by Laszlo, the proposed subject here gives me > the feeling of changing all the global variables in the module. >=20 > However, I am okay if you stick with the proposed subject. Anyway, > Reviewed-by: Hao Wu I want to use that subject too. But the actual variable name ' mExitBootSe= rvicesEvent' is too long. If the changed driver name is also long such as p= atch #5, then the subject would be out of size. And the actual changed glob= al variable is mentioned in the commit message. That is why I didn't take L= aszlo's suggestion. Thanks, Zhichao >=20 > Best Regards, > Hao Wu >=20 > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1740 > > > > 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 > > Cc: Jian J Wang > > Cc: Hao Wu > > Cc: Ray Ni > > Cc: Star Zeng > > Cc: Liming Gao > > Cc: Dandan Bi > > Signed-off-by: Zhichao Gao > > --- > > .../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.
> > + Copyright (c) 2011 - 2019, Intel Corporation. All rights > > + reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > @@ -40,7 +40,7 @@ EFI_RSC_HANDLER_PROTOCOL > *mRscHandlerProtocol > > =3D NULL; > > BOOLEAN mLockBoxReady =3D FALSE; > > EFI_EVENT mReadyToBootEvent; > > EFI_EVENT mLegacyBootEvent; > > -EFI_EVENT mExitBootServicesEvent; > > +static EFI_EVENT mExitBootServicesEvent; > > UINTN mFirmwarePerformanceTableTemplateKey =3D= 0; > > BOOLEAN mDxeCoreReportStatusCodeEnable =3D FALSE; > > > > -- > > 2.21.0.windows.1 > > > > > >=20