public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Dandan Bi <dandan.bi@intel.com>
To: edk2-devel@lists.01.org
Cc: Laszlo Ersek <lersek@redhat.com>,
	Liming Gao <liming.gao@intel.com>,
	Eric Dong <eric.dong@intel.com>
Subject: [patch 2/5] MdeModulePkg/BMMUI: Remove the incorrect and useless codes
Date: Mon, 17 Oct 2016 16:51:55 +0800	[thread overview]
Message-ID: <1476694318-18804-2-git-send-email-dandan.bi@intel.com> (raw)
In-Reply-To: <1476694318-18804-1-git-send-email-dandan.bi@intel.com>

When updating console page, the "ConsoleCheck" in BmmFakeNvData may maintain
the old uncommitted data, we should not copy it to BmmOldFakeNVData.
And in BootMaintRouteConfig function, when save data successfully,
it will copy the BmmFakeNvData to the BmmOldFakeNVData.
So we can delete the logic here.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../Library/BootMaintenanceManagerUiLib/UpdatePage.c         | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
index ee8ff5d..960d0b0 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c
@@ -457,46 +457,36 @@ UpdateConsolePage (
   BM_TERMINAL_CONTEXT *NewTerminalContext;
   UINT16              Index;
   UINT16              Index2;
   UINT8               CheckFlags;
   UINT8               *ConsoleCheck;
-  UINT8               *OldConsoleCheck;
-  UINTN               ConsoleCheckSize;
   EFI_QUESTION_ID     QuestionIdBase;
   UINT16              VariableOffsetBase;
 
   CallbackData->BmmAskSaveOrNot = TRUE;
 
   UpdatePageStart (CallbackData);
 
   ConsoleCheck       = NULL;
-  OldConsoleCheck    = NULL;
   QuestionIdBase     = 0;
   VariableOffsetBase = 0;
-  ConsoleCheckSize   = 0;
 
   switch (UpdatePageId) {
   case FORM_CON_IN_ID:
     ConsoleCheck       = &CallbackData->BmmFakeNvData.ConsoleInCheck[0];
-    OldConsoleCheck    = &CallbackData->BmmOldFakeNVData.ConsoleInCheck[0];
-    ConsoleCheckSize   = sizeof (CallbackData->BmmFakeNvData.ConsoleInCheck);
     QuestionIdBase     = CON_IN_DEVICE_QUESTION_ID;
     VariableOffsetBase = CON_IN_DEVICE_VAR_OFFSET;
     break;
 
   case FORM_CON_OUT_ID:
     ConsoleCheck       = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0];
-    OldConsoleCheck    = &CallbackData->BmmOldFakeNVData.ConsoleOutCheck[0];
-    ConsoleCheckSize   = sizeof (CallbackData->BmmFakeNvData.ConsoleOutCheck);
     QuestionIdBase     = CON_OUT_DEVICE_QUESTION_ID;
     VariableOffsetBase = CON_OUT_DEVICE_VAR_OFFSET;
     break;
 
   case FORM_CON_ERR_ID:
     ConsoleCheck       = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0];
-    OldConsoleCheck    = &CallbackData->BmmOldFakeNVData.ConsoleErrCheck[0];
-    ConsoleCheckSize   = sizeof (CallbackData->BmmFakeNvData.ConsoleErrCheck);
     QuestionIdBase     = CON_ERR_DEVICE_QUESTION_ID;
     VariableOffsetBase = CON_ERR_DEVICE_VAR_OFFSET;
     break;
   }
   ASSERT (ConsoleCheck != NULL);
@@ -554,12 +544,10 @@ UpdateConsolePage (
       );
 
     Index++;
   }
 
-  CopyMem (OldConsoleCheck, ConsoleCheck, ConsoleCheckSize);
-
   UpdatePageEnd (CallbackData);
 }
 
 /**
   Update the page's NV Map if user has changed the order
-- 
1.9.5.msysgit.1



  reply	other threads:[~2016-10-17  8:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17  8:51 [patch 1/5] MdeModulePkg/BMMUI: Update TerminalMenu and ConsoleMenu in callback Dandan Bi
2016-10-17  8:51 ` Dandan Bi [this message]
2016-10-17  8:51 ` [patch 3/5] MdeModulePkg/BMMUI: Make the BmmFakeNvData and BmmOldFakeNVData consistent Dandan Bi
2016-10-17  8:51 ` [patch 4/5] MdeModulePkg/BMMUI: Show "Change Boot/Driver order" page correctly Dandan Bi
2016-10-17  8:51 ` [patch 5/5] MdeModulePkg/BMMUI: Add error handling codes Dandan Bi

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=1476694318-18804-2-git-send-email-dandan.bi@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