From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0CF3981E1E for ; Wed, 16 Nov 2016 22:34:19 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 16 Nov 2016 22:34:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,504,1473145200"; d="scan'208";a="787464397" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by FMSMGA003.fm.intel.com with ESMTP; 16 Nov 2016 22:34:23 -0800 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 16 Nov 2016 22:34:23 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 16 Nov 2016 22:34:23 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0248.002; Thu, 17 Nov 2016 14:34:21 +0800 From: "Gao, Liming" To: "Dong, Eric" , "edk2-devel@lists.01.org" CC: "Bi, Dandan" Thread-Topic: [Patch] MdeModulePkg HiiDatabase: Remove extra memory initialization. Thread-Index: AQHSPugDZCpn4gO4i0SCpaPgzFlmA6Dcux4A Date: Thu, 17 Nov 2016 06:34:21 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14B4B4BBA@shsmsx102.ccr.corp.intel.com> References: <1479176926-24656-1-git-send-email-eric.dong@intel.com> In-Reply-To: <1479176926-24656-1-git-send-email-eric.dong@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] MdeModulePkg HiiDatabase: Remove extra memory initialization. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2016 06:34:19 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Dong, Eric > Sent: Tuesday, November 15, 2016 10:29 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming ; Bi, Dandan > Subject: [Patch] MdeModulePkg HiiDatabase: Remove extra memory > initialization. >=20 > The memory will be set to background color after success allocate > the data, so not need to call AllocateZeroPool. >=20 > Related bugz: https://bugzilla.tianocore.org/show_bug.cgi?id=3D223 >=20 > Cc: Liming Gao > Cc: Dandan Bi > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Eric Dong > --- > MdeModulePkg/Universal/HiiDatabaseDxe/Font.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c > b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c > index 7855c7e..9bef064 100644 > --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c > +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c > @@ -2056,7 +2056,7 @@ HiiStringToImage ( > if ((Flags & EFI_HII_DIRECT_TO_SCREEN) =3D=3D EFI_HII_DIRECT_TO_SCRE= EN) { > BltBuffer =3D NULL; > if (RowInfo[RowIndex].LineWidth !=3D 0) { > - BltBuffer =3D AllocateZeroPool (RowInfo[RowIndex].LineWidth * > RowInfo[RowIndex].LineHeight * sizeof > (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); > + BltBuffer =3D AllocatePool (RowInfo[RowIndex].LineWidth * > RowInfo[RowIndex].LineHeight * sizeof > (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)); > if (BltBuffer =3D=3D NULL) { > Status =3D EFI_OUT_OF_RESOURCES; > goto Exit; > -- > 2.6.4.windows.1