From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=hao.a.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 788012118F366 for ; Wed, 21 Nov 2018 21:01:39 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2018 21:01:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,264,1539673200"; d="scan'208";a="108343483" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 21 Nov 2018 21:01:38 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 21 Nov 2018 21:01:37 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 21 Nov 2018 21:01:38 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.117]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.199]) with mapi id 14.03.0415.000; Thu, 22 Nov 2018 13:01:35 +0800 From: "Wu, Hao A" To: "Chiu, Chasel" , "edk2-devel@lists.01.org" CC: "Yao, Jiewen" , "Desimone, Nathaniel L" Thread-Topic: [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue Thread-Index: AQHUgha8AYKJuWYxIEmbJ73FlBhf2aVbPKVA Date: Thu, 22 Nov 2018 05:01:35 +0000 Message-ID: References: <20181122035103.16940-1-chasel.chiu@intel.com> <20181122035103.16940-3-chasel.chiu@intel.com> In-Reply-To: <20181122035103.16940-3-chasel.chiu@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 Subject: Re: [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 05:01:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Chiu, Chasel > Sent: Thursday, November 22, 2018 11:51 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen; Desimone, Nathaniel L; Wu, Hao A; Chiu, Chasel > Subject: [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements > issue >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1351 >=20 > Internal code quality scanning found 2 constant if > statements related to FixedPcdGet8 () usage. > Since the PCD can be PatchableInModule too, it should be > changed to PcdGet8 () to fix this issue. >=20 > Test: Verified on internal platform and booted successfully. Reviewed-by: Hao Wu Best Regards, Hao Wu >=20 > Cc: Jiewen Yao > Cc: Desimone Nathaniel L > Cc: Wu Hao A > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Chasel Chiu > --- > IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- > IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > index fa0441ce6c..18f04b541a 100644 > --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c > @@ -157,7 +157,7 @@ FspmWrapperInit ( >=20 > Status =3D EFI_SUCCESS; >=20 > - if (FixedPcdGet8 (PcdFspModeSelection) =3D=3D 1) { > + if (PcdGet8 (PcdFspModeSelection) =3D=3D 1) { > Status =3D PeiFspMemoryInit (); > ASSERT_EFI_ERROR (Status); > } else { > diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > index 87dd61e5c5..d748b21f7c 100644 > --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c > @@ -349,7 +349,7 @@ FspsWrapperPeimEntryPoint ( > { > DEBUG ((DEBUG_INFO, "FspsWrapperPeimEntryPoint\n")); >=20 > - if (FixedPcdGet8 (PcdFspModeSelection) =3D=3D 1) { > + if (PcdGet8 (PcdFspModeSelection) =3D=3D 1) { > FspsWrapperInit (); > } else { > PeiServicesInstallFvInfoPpi ( > -- > 2.13.3.windows.1