From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 357A781DC7 for ; Wed, 9 Nov 2016 23:54:47 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 09 Nov 2016 23:54:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,617,1473145200"; d="scan'208";a="1057738299" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 09 Nov 2016 23:54:50 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 9 Nov 2016 23:54:50 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 9 Nov 2016 23:54:49 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.142]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0248.002; Thu, 10 Nov 2016 15:54:47 +0800 From: "Ni, Ruiyu" To: "Song, BinX" , "Gao, Liming" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if judgments Thread-Index: AdI5bGYtKg7YBQKaTfa0QQ59IHzODwAw/F1wAC+aRsAADjNBYA== Date: Thu, 10 Nov 2016 07:54:47 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58E70410@SHSMSX104.ccr.corp.intel.com> References: <559D2DF22BC9A3468B4FA1AA547F0EF135530D@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14B4A0C1D@shsmsx102.ccr.corp.intel.com> <559D2DF22BC9A3468B4FA1AA547F0EF13590B7@shsmsx102.ccr.corp.intel.com> In-Reply-To: <559D2DF22BC9A3468B4FA1AA547F0EF13590B7@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if judgments 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, 10 Nov 2016 07:54:47 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Bell, FreePool (Blt) purposely frees the pool of Image.Bitmap, which was returned= from previous loop. It's useful. Thanks/Ray > -----Original Message----- > From: Song, BinX > Sent: Thursday, November 10, 2016 1:42 PM > To: Gao, Liming ; edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: RE: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if > judgments >=20 > Hi Liming, >=20 > In BootLogoEnableLogo() function, the FreePool(Blt) function will never b= e > called, some Blt related code as below: >=20 > a. Blt =3D NULL; -> Step 1, Blt was initialized. > ...... > b. if (Blt !=3D NULL) { \ > FreePool (Blt); -- Step 2, Blt was checked, the judgment is al= ways false. > } / >=20 > c. Blt =3D Image.Bitmap; Step 3, Blt get an valid value. >=20 > From above, I think we can remove this if judgment. >=20 > Best Regards, > Bell Song >=20 > > -----Original Message----- > > From: Gao, Liming > > Sent: Wednesday, November 9, 2016 10:25 AM > > To: Song, BinX ; edk2-devel@lists.01.org > > Cc: Ni, Ruiyu > > Subject: RE: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if > > judgments > > > > Bin: > > Why remove FreePool (Blt)? It is still used. > > > > Thanks > > Liming > > > -----Original Message----- > > > From: Song, BinX > > > Sent: Tuesday, November 08, 2016 11:01 AM > > > To: edk2-devel@lists.01.org > > > Cc: Gao, Liming > > > Subject: [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if > > judgments > > > > > > There are two invalid if judgments in BootLogoEnableLogo() function, > > > remove them. > > > > > > Cc: Liming Gao > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > > Signed-off-by: Bell Song > > > --- > > > MdeModulePkg/Library/BootLogoLib/BootLogoLib.c | 8 -------- > > > 1 file changed, 8 deletions(-) > > > > > > diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > > b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > > index 2c1e8ea..b69dda8 100644 > > > --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > > +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c > > > @@ -141,14 +141,6 @@ BootLogoEnableLogo ( > > > if (EFI_ERROR (Status)) { > > > break; > > > } > > > - > > > - if (EFI_ERROR (Status)) { > > > - continue; > > > - } > > > - > > > - if (Blt !=3D NULL) { > > > - FreePool (Blt); > > > - } > > > Blt =3D Image.Bitmap; > > > > > > // > > > -- > > > 2.7.2.windows.1