From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1556421B02B8E for ; Thu, 29 Jun 2017 01:30:53 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP; 29 Jun 2017 01:32:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,279,1496127600"; d="scan'208";a="872956487" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.28]) by FMSMGA003.fm.intel.com with ESMTP; 29 Jun 2017 01:32:24 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Star Zeng Date: Thu, 29 Jun 2017 16:32:20 +0800 Message-Id: <20170629083221.485184-3-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.12.2.windows.2 In-Reply-To: <20170629083221.485184-1-ruiyu.ni@intel.com> References: <20170629083221.485184-1-ruiyu.ni@intel.com> Subject: [PATCH 2/3] MdeModulePkg/ResetSystem: Remove unnecessary global variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 08:30:53 -0000 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Star Zeng --- MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c index f61e65e151..64f2da5ce9 100644 --- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c +++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c @@ -1,7 +1,7 @@ /** @file Reset Architectural Protocol implementation - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -15,11 +15,6 @@ #include "ResetSystem.h" -// -// The handle onto which the Reset Architectural Protocol is installed -// -EFI_HANDLE mResetHandle = NULL; - /** The driver's entry point. @@ -40,6 +35,7 @@ InitializeResetSystem ( ) { EFI_STATUS Status; + EFI_HANDLE Handle; // // Make sure the Reset Architectural Protocol is not already installed in the system @@ -54,8 +50,9 @@ InitializeResetSystem ( // // Now install the Reset RT AP on a new handle // + Handle = NULL; Status = gBS->InstallMultipleProtocolInterfaces ( - &mResetHandle, + &Handle, &gEfiResetArchProtocolGuid, NULL, NULL -- 2.12.2.windows.2