public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chasel, Chiu" <chasel.chiu@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiewen Yao <Jiewen.yao@intel.com>,
	Desimone Nathaniel L <nathaniel.l.desimone@intel.com>,
	Wu Hao A <hao.a.wu@intel.com>,
	Chasel Chiu <chasel.chiu@intel.com>
Subject: [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue
Date: Thu, 22 Nov 2018 11:51:03 +0800	[thread overview]
Message-ID: <20181122035103.16940-3-chasel.chiu@intel.com> (raw)
In-Reply-To: <20181122035103.16940-1-chasel.chiu@intel.com>

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>
---
 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



  parent reply	other threads:[~2018-11-22  3:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22  3:51 [PATCH v2 0/2] Fix constant if statement issue Chasel, Chiu
2018-11-22  3:51 ` [PATCH v2 1/2] IntelFsp2WrapperPkg: Fix line ending format issue Chasel, Chiu
2018-11-22  5:00   ` Wu, Hao A
2018-11-22  3:51 ` Chasel, Chiu [this message]
2018-11-22  5:01   ` [PATCH v2 2/2] IntelFsp2WrapperPkg: Fix constant if statements issue Wu, Hao A
2018-11-22  5:04 ` [PATCH v2 0/2] Fix constant if statement issue Zeng, Star

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181122035103.16940-3-chasel.chiu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox