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.31, mailfrom: hao.a.wu@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Fri, 26 Apr 2019 01:30:22 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Apr 2019 01:30:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,396,1549958400"; d="scan'208";a="319143786" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 26 Apr 2019 01:30:20 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 26 Apr 2019 01:30:19 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.92]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.42]) with mapi id 14.03.0415.000; Fri, 26 Apr 2019 16:30:18 +0800 From: "Wu, Hao A" To: "Gao, Zhichao" , "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+8wQH+BsKOVm6kabERfKvDNOZKZN8QpQ//+glACAAImcYA== Date: Fri, 26 Apr 2019 08:30:17 +0000 Message-ID: References: <20190426010404.20624-1-zhichao.gao@intel.com> <20190426010404.20624-6-zhichao.gao@intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B7C4671@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <3CE959C139B4C44DBEA1810E3AA6F9000B7C4671@SHSMSX101.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----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, Da= ndan > Subject: RE: [edk2-devel] [PATCH V3 5/8] > MdeModulePkg/FirmwarePerformanceDxe: make global variable static >=20 >=20 >=20 > > -----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, Lim= ing > > ; Bi, Dandan > > 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 O= f > > > 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 >=20 > 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 >=20 > Thanks, > Zhichao >=20 > > > > Best Regards, > > Hao Wu > > > > > > > > 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 FALS= E; > > > > > > -- > > > 2.21.0.windows.1 > > > > > > > > >=20