From e8f40b770f5eeb1031a56fcab9afc9c12a4ecafa Mon Sep 17 00:00:00 2001 From: "Chasel, Chiu" Date: Thu, 22 Nov 2018 10:51:21 +0800 Subject: IntelFsp2WrapperPkg: Fix constant if statements issue 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 Reviewed-by: Star Zeng Reviewed-by: Hao Wu --- IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 2 +- IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'IntelFsp2WrapperPkg') 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 ( -- cgit v1.2.3