From: Chasel, Chiu Date: Thu, 22 Nov 2018 02:51:21 +0000 (+0800) Subject: IntelFsp2WrapperPkg: Fix constant if statements issue X-Git-Tag: edk2-stable201903~572 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=e8f40b770f5eeb1031a56fcab9afc9c12a4ecafa 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 --- 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 (