Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
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.<BR>
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Star Zeng <star.zeng@intel.com>
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiyu Ni
Sent: Thursday, June 29, 2017 4:32 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>
Subject: [edk2] [PATCH 2/3] MdeModulePkg/ResetSystem: Remove unnecessary global variable
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
---
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.<BR>
+ Copyright (c) 2006 - 2017, Intel Corporation. All rights
+ reserved.<BR>
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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2025 Red Hat, Inc.