diff options
author | Laszlo Ersek <lersek@redhat.com> | 2019-09-13 00:29:43 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-10-09 09:40:10 +0200 |
commit | f662f91cb2c8f109816c24d91957f4d254245633 (patch) | |
tree | 7770918502f0244d2d177e5daac0e901d6470232 /MdeModulePkg | |
parent | 9388c6b1c17af9c8a9f451a42c066b3ae7d81fda (diff) | |
download | edk2-f662f91cb2c8f109816c24d91957f4d254245633.zip edk2-f662f91cb2c8f109816c24d91957f4d254245633.tar.gz edk2-f662f91cb2c8f109816c24d91957f4d254245633.tar.bz2 |
MdeModulePkg/PiSmmCore: make type punning consistent
The SmiHandlerRegister() function explicitly casts "SmiHandler" (of type
(SMI_HANDLER*)) to EFI_HANDLE, when outputting "DispatchHandle".
Apply the same cast in the counterpart function SmiHandlerUnRegister(),
which compares multiple "SmiHandler"s against the input "DispatchHandle".
This is a semantic cleanup; there is no functional change.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/Smi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/Smi.c b/MdeModulePkg/Core/PiSmmCore/Smi.c index f8bd9f49..488af67 100644 --- a/MdeModulePkg/Core/PiSmmCore/Smi.c +++ b/MdeModulePkg/Core/PiSmmCore/Smi.c @@ -282,7 +282,7 @@ SmiHandlerUnRegister ( //
SmiHandler = NULL;
for ( HandlerLink = GetFirstNode (&mRootSmiEntry.SmiHandlers)
- ; !IsNull (&mRootSmiEntry.SmiHandlers, HandlerLink) && (SmiHandler != DispatchHandle)
+ ; !IsNull (&mRootSmiEntry.SmiHandlers, HandlerLink) && ((EFI_HANDLE) SmiHandler != DispatchHandle)
; HandlerLink = GetNextNode (&mRootSmiEntry.SmiHandlers, HandlerLink)
) {
SmiHandler = CR (HandlerLink, SMI_HANDLER, Link, SMI_HANDLER_SIGNATURE);
@@ -292,19 +292,19 @@ SmiHandlerUnRegister ( // Look for it in non-root SMI handlers
//
for ( EntryLink = GetFirstNode (&mSmiEntryList)
- ; !IsNull (&mSmiEntryList, EntryLink) && (SmiHandler != DispatchHandle)
+ ; !IsNull (&mSmiEntryList, EntryLink) && ((EFI_HANDLE) SmiHandler != DispatchHandle)
; EntryLink = GetNextNode (&mSmiEntryList, EntryLink)
) {
SmiEntry = CR (EntryLink, SMI_ENTRY, AllEntries, SMI_ENTRY_SIGNATURE);
for ( HandlerLink = GetFirstNode (&SmiEntry->SmiHandlers)
- ; !IsNull (&SmiEntry->SmiHandlers, HandlerLink) && (SmiHandler != DispatchHandle)
+ ; !IsNull (&SmiEntry->SmiHandlers, HandlerLink) && ((EFI_HANDLE) SmiHandler != DispatchHandle)
; HandlerLink = GetNextNode (&SmiEntry->SmiHandlers, HandlerLink)
) {
SmiHandler = CR (HandlerLink, SMI_HANDLER, Link, SMI_HANDLER_SIGNATURE);
}
}
- if (SmiHandler != DispatchHandle) {
+ if ((EFI_HANDLE) SmiHandler != DispatchHandle) {
return EFI_INVALID_PARAMETER;
}
|