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.126; helo=mga18.intel.com; envelope-from=chasel.chiu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 C15C4211944BF for ; Wed, 21 Nov 2018 19:51:56 -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 orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2018 19:51:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,263,1539673200"; d="scan'208";a="108327711" Received: from cchiu4-mobl1.gar.corp.intel.com ([10.5.240.28]) by fmsmga004.fm.intel.com with ESMTP; 21 Nov 2018 19:51:54 -0800 From: "Chasel, Chiu" To: edk2-devel@lists.01.org Cc: Jiewen Yao , Desimone Nathaniel L , Wu Hao A , Chasel Chiu Date: Thu, 22 Nov 2018 11:51:03 +0800 Message-Id: <20181122035103.16940-3-chasel.chiu@intel.com> X-Mailer: git-send-email 2.13.3.windows.1 In-Reply-To: <20181122035103.16940-1-chasel.chiu@intel.com> References: <20181122035103.16940-1-chasel.chiu@intel.com> Subject: [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 03:51:57 -0000 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1351 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. Test: Verified on internal platform and booted successfully. 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(-) 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 ( Status = EFI_SUCCESS; - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { + if (PcdGet8 (PcdFspModeSelection) == 1) { Status = 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")); - if (FixedPcdGet8 (PcdFspModeSelection) == 1) { + if (PcdGet8 (PcdFspModeSelection) == 1) { FspsWrapperInit (); } else { PeiServicesInstallFvInfoPpi ( -- 2.13.3.windows.1