]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelFsp2WrapperPkg: Fix constant if statements issue
authorChasel, Chiu <chasel.chiu@intel.com>
Thu, 22 Nov 2018 02:51:21 +0000 (10:51 +0800)
committerChasel, Chiu <chasel.chiu@intel.com>
Mon, 26 Nov 2018 03:40:38 +0000 (11:40 +0800)
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 <Jiewen.yao@intel.com>
Cc: Desimone Nathaniel L <nathaniel.l.desimone@intel.com>
Cc: Wu Hao A <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c

index fa0441ce6c0eee9f54cb17ac5f90a2c35f240c78..18f04b541a21714a115dab64cd2516ff16a30103 100644 (file)
@@ -157,7 +157,7 @@ FspmWrapperInit (
 \r
   Status = EFI_SUCCESS;\r
 \r
-  if (FixedPcdGet8 (PcdFspModeSelection) == 1) {\r
+  if (PcdGet8 (PcdFspModeSelection) == 1) {\r
     Status = PeiFspMemoryInit ();\r
     ASSERT_EFI_ERROR (Status);\r
   } else {\r
index 87dd61e5c56b4d55465e74b41a54b1f59672fc39..d748b21f7c713f8cd2f6abeaa2a8797d7a70a1e6 100644 (file)
@@ -349,7 +349,7 @@ FspsWrapperPeimEntryPoint (
 {\r
   DEBUG ((DEBUG_INFO, "FspsWrapperPeimEntryPoint\n"));\r
 \r
-  if (FixedPcdGet8 (PcdFspModeSelection) == 1) {\r
+  if (PcdGet8 (PcdFspModeSelection) == 1) {\r
     FspsWrapperInit ();\r
   } else {\r
     PeiServicesInstallFvInfoPpi (\r