StandaloneMmPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the StandaloneMmPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
c1e126b119
commit
91415a36ae
@@ -13,8 +13,8 @@
|
||||
// mProtocolDatabase - A list of all protocols in the system. (simple list for now)
|
||||
// gHandleList - A list of all the handles in the system
|
||||
//
|
||||
LIST_ENTRY mProtocolDatabase = INITIALIZE_LIST_HEAD_VARIABLE (mProtocolDatabase);
|
||||
LIST_ENTRY gHandleList = INITIALIZE_LIST_HEAD_VARIABLE (gHandleList);
|
||||
LIST_ENTRY mProtocolDatabase = INITIALIZE_LIST_HEAD_VARIABLE (mProtocolDatabase);
|
||||
LIST_ENTRY gHandleList = INITIALIZE_LIST_HEAD_VARIABLE (gHandleList);
|
||||
|
||||
/**
|
||||
Check whether a handle is a valid EFI_HANDLE
|
||||
@@ -36,9 +36,11 @@ MmValidateHandle (
|
||||
if (Handle == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (Handle->Signature != EFI_HANDLE_SIGNATURE) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -53,13 +55,13 @@ MmValidateHandle (
|
||||
**/
|
||||
PROTOCOL_ENTRY *
|
||||
MmFindProtocolEntry (
|
||||
IN EFI_GUID *Protocol,
|
||||
IN BOOLEAN Create
|
||||
IN EFI_GUID *Protocol,
|
||||
IN BOOLEAN Create
|
||||
)
|
||||
{
|
||||
LIST_ENTRY *Link;
|
||||
PROTOCOL_ENTRY *Item;
|
||||
PROTOCOL_ENTRY *ProtEntry;
|
||||
LIST_ENTRY *Link;
|
||||
PROTOCOL_ENTRY *Item;
|
||||
PROTOCOL_ENTRY *ProtEntry;
|
||||
|
||||
//
|
||||
// Search the database for the matching GUID
|
||||
@@ -68,8 +70,8 @@ MmFindProtocolEntry (
|
||||
ProtEntry = NULL;
|
||||
for (Link = mProtocolDatabase.ForwardLink;
|
||||
Link != &mProtocolDatabase;
|
||||
Link = Link->ForwardLink) {
|
||||
|
||||
Link = Link->ForwardLink)
|
||||
{
|
||||
Item = CR (Link, PROTOCOL_ENTRY, AllEntries, PROTOCOL_ENTRY_SIGNATURE);
|
||||
if (CompareGuid (&Item->ProtocolID, Protocol)) {
|
||||
//
|
||||
@@ -85,7 +87,7 @@ MmFindProtocolEntry (
|
||||
// allocate a new entry
|
||||
//
|
||||
if ((ProtEntry == NULL) && Create) {
|
||||
ProtEntry = AllocatePool (sizeof(PROTOCOL_ENTRY));
|
||||
ProtEntry = AllocatePool (sizeof (PROTOCOL_ENTRY));
|
||||
if (ProtEntry != NULL) {
|
||||
//
|
||||
// Initialize new protocol entry structure
|
||||
@@ -101,6 +103,7 @@ MmFindProtocolEntry (
|
||||
InsertTailList (&mProtocolDatabase, &ProtEntry->AllEntries);
|
||||
}
|
||||
}
|
||||
|
||||
return ProtEntry;
|
||||
}
|
||||
|
||||
@@ -137,17 +140,19 @@ MmFindProtocolInterface (
|
||||
//
|
||||
// Look at each protocol interface for any matches
|
||||
//
|
||||
for (Link = Handle->Protocols.ForwardLink; Link != &Handle->Protocols; Link=Link->ForwardLink) {
|
||||
for (Link = Handle->Protocols.ForwardLink; Link != &Handle->Protocols; Link = Link->ForwardLink) {
|
||||
//
|
||||
// If this protocol interface matches, remove it
|
||||
//
|
||||
Prot = CR (Link, PROTOCOL_INTERFACE, Link, PROTOCOL_INTERFACE_SIGNATURE);
|
||||
if (Prot->Interface == Interface && Prot->Protocol == ProtEntry) {
|
||||
if ((Prot->Interface == Interface) && (Prot->Protocol == ProtEntry)) {
|
||||
break;
|
||||
}
|
||||
|
||||
Prot = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return Prot;
|
||||
}
|
||||
|
||||
@@ -219,7 +224,7 @@ MmInstallProtocolInterfaceNotify (
|
||||
// returns EFI_INVALID_PARAMETER if InterfaceType is invalid.
|
||||
// Also added check for invalid UserHandle and Protocol pointers.
|
||||
//
|
||||
if (UserHandle == NULL || Protocol == NULL) {
|
||||
if ((UserHandle == NULL) || (Protocol == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -233,7 +238,7 @@ MmInstallProtocolInterfaceNotify (
|
||||
DEBUG ((DEBUG_LOAD | DEBUG_INFO, "MmInstallProtocolInterface: %g %p\n", Protocol, Interface));
|
||||
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
Prot = NULL;
|
||||
Prot = NULL;
|
||||
Handle = NULL;
|
||||
|
||||
if (*UserHandle != NULL) {
|
||||
@@ -298,8 +303,8 @@ MmInstallProtocolInterfaceNotify (
|
||||
// Initialize the protocol interface structure
|
||||
//
|
||||
Prot->Signature = PROTOCOL_INTERFACE_SIGNATURE;
|
||||
Prot->Handle = Handle;
|
||||
Prot->Protocol = ProtEntry;
|
||||
Prot->Handle = Handle;
|
||||
Prot->Protocol = ProtEntry;
|
||||
Prot->Interface = Interface;
|
||||
|
||||
//
|
||||
@@ -320,6 +325,7 @@ MmInstallProtocolInterfaceNotify (
|
||||
if (Notify) {
|
||||
MmNotifyProtocol (Prot);
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
Done:
|
||||
@@ -336,6 +342,7 @@ Done:
|
||||
FreePool (Prot);
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -416,6 +423,7 @@ MmUninstallProtocolInterface (
|
||||
RemoveEntryList (&Handle->AllHandles);
|
||||
FreePool (Handle);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -451,12 +459,13 @@ MmGetProtocolInterface (
|
||||
// Look at each protocol interface for a match
|
||||
//
|
||||
for (Link = Handle->Protocols.ForwardLink; Link != &Handle->Protocols; Link = Link->ForwardLink) {
|
||||
Prot = CR (Link, PROTOCOL_INTERFACE, Link, PROTOCOL_INTERFACE_SIGNATURE);
|
||||
Prot = CR (Link, PROTOCOL_INTERFACE, Link, PROTOCOL_INTERFACE_SIGNATURE);
|
||||
ProtEntry = Prot->Protocol;
|
||||
if (CompareGuid (&ProtEntry->ProtocolID, Protocol)) {
|
||||
return Prot;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user