MdeModulePkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg 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: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:02 -08:00
committed by mergify[bot]
parent 7c7184e201
commit 1436aea4d5
994 changed files with 107608 additions and 101311 deletions

View File

@@ -9,26 +9,25 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#ifndef _HAND_H_
#define _HAND_H_
#define EFI_HANDLE_SIGNATURE SIGNATURE_32('h','n','d','l')
#define EFI_HANDLE_SIGNATURE SIGNATURE_32('h','n','d','l')
///
/// IHANDLE - contains a list of protocol handles
///
typedef struct {
UINTN Signature;
UINTN Signature;
/// All handles list of IHANDLE
LIST_ENTRY AllHandles;
LIST_ENTRY AllHandles;
/// List of PROTOCOL_INTERFACE's for this handle
LIST_ENTRY Protocols;
UINTN LocateRequest;
LIST_ENTRY Protocols;
UINTN LocateRequest;
/// The Handle Database Key value when this handle was last created or modified
UINT64 Key;
UINT64 Key;
} IHANDLE;
#define ASSERT_IS_HANDLE(a) ASSERT((a)->Signature == EFI_HANDLE_SIGNATURE)
#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('p','r','t','e')
#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('p','r','t','e')
///
/// PROTOCOL_ENTRY - each different protocol has 1 entry in the protocol
@@ -36,18 +35,17 @@ typedef struct {
/// with a list of registered notifies.
///
typedef struct {
UINTN Signature;
UINTN Signature;
/// Link Entry inserted to mProtocolDatabase
LIST_ENTRY AllEntries;
LIST_ENTRY AllEntries;
/// ID of the protocol
EFI_GUID ProtocolID;
EFI_GUID ProtocolID;
/// All protocol interfaces
LIST_ENTRY Protocols;
LIST_ENTRY Protocols;
/// Registerd notification handlers
LIST_ENTRY Notify;
LIST_ENTRY Notify;
} PROTOCOL_ENTRY;
#define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('p','i','f','c')
///
@@ -55,55 +53,51 @@ typedef struct {
/// with a protocol interface structure
///
typedef struct {
UINTN Signature;
UINTN Signature;
/// Link on IHANDLE.Protocols
LIST_ENTRY Link;
LIST_ENTRY Link;
/// Back pointer
IHANDLE *Handle;
IHANDLE *Handle;
/// Link on PROTOCOL_ENTRY.Protocols
LIST_ENTRY ByProtocol;
LIST_ENTRY ByProtocol;
/// The protocol ID
PROTOCOL_ENTRY *Protocol;
PROTOCOL_ENTRY *Protocol;
/// The interface value
VOID *Interface;
VOID *Interface;
/// OPEN_PROTOCOL_DATA list
LIST_ENTRY OpenList;
UINTN OpenListCount;
LIST_ENTRY OpenList;
UINTN OpenListCount;
} PROTOCOL_INTERFACE;
#define OPEN_PROTOCOL_DATA_SIGNATURE SIGNATURE_32('p','o','d','l')
typedef struct {
UINTN Signature;
///Link on PROTOCOL_INTERFACE.OpenList
LIST_ENTRY Link;
UINTN Signature;
/// Link on PROTOCOL_INTERFACE.OpenList
LIST_ENTRY Link;
EFI_HANDLE AgentHandle;
EFI_HANDLE ControllerHandle;
UINT32 Attributes;
UINT32 OpenCount;
EFI_HANDLE AgentHandle;
EFI_HANDLE ControllerHandle;
UINT32 Attributes;
UINT32 OpenCount;
} OPEN_PROTOCOL_DATA;
#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('p','r','t','n')
#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('p','r','t','n')
///
/// PROTOCOL_NOTIFY - used for each register notification for a protocol
///
typedef struct {
UINTN Signature;
PROTOCOL_ENTRY *Protocol;
UINTN Signature;
PROTOCOL_ENTRY *Protocol;
/// All notifications for this protocol
LIST_ENTRY Link;
LIST_ENTRY Link;
/// Event to notify
EFI_EVENT Event;
EFI_EVENT Event;
/// Last position notified
LIST_ENTRY *Position;
LIST_ENTRY *Position;
} PROTOCOL_NOTIFY;
/**
Finds the protocol entry for the requested protocol.
The gProtocolDatabaseLock must be owned
@@ -116,11 +110,10 @@ typedef struct {
**/
PROTOCOL_ENTRY *
CoreFindProtocolEntry (
IN EFI_GUID *Protocol,
IN BOOLEAN Create
IN EFI_GUID *Protocol,
IN BOOLEAN Create
);
/**
Signal event for every protocol in protocol entry.
@@ -129,10 +122,9 @@ CoreFindProtocolEntry (
**/
VOID
CoreNotifyProtocolEntry (
IN PROTOCOL_ENTRY *ProtEntry
IN PROTOCOL_ENTRY *ProtEntry
);
/**
Finds the protocol instance for the requested handle and protocol.
Note: This function doesn't do parameters checking, it's caller's responsibility
@@ -147,12 +139,11 @@ CoreNotifyProtocolEntry (
**/
PROTOCOL_INTERFACE *
CoreFindProtocolInterface (
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
);
/**
Removes Protocol from the protocol list (but not the handle list).
@@ -165,12 +156,11 @@ CoreFindProtocolInterface (
**/
PROTOCOL_INTERFACE *
CoreRemoveInterfaceFromProtocol (
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
IN IHANDLE *Handle,
IN EFI_GUID *Protocol,
IN VOID *Interface
);
/**
Connects a controller to a driver.
@@ -215,11 +205,10 @@ CoreConnectSingleController (
**/
EFI_STATUS
CoreDisconnectControllersUsingProtocolInterface (
IN EFI_HANDLE UserHandle,
IN PROTOCOL_INTERFACE *Prot
IN EFI_HANDLE UserHandle,
IN PROTOCOL_INTERFACE *Prot
);
/**
Acquire lock on gProtocolDatabaseLock.
@@ -229,7 +218,6 @@ CoreAcquireProtocolLock (
VOID
);
/**
Release lock on gProtocolDatabaseLock.
@@ -239,7 +227,6 @@ CoreReleaseProtocolLock (
VOID
);
/**
Check whether a handle is a valid EFI_HANDLE
The gProtocolDatabaseLock must be owned
@@ -252,14 +239,14 @@ CoreReleaseProtocolLock (
**/
EFI_STATUS
CoreValidateHandle (
IN EFI_HANDLE UserHandle
IN EFI_HANDLE UserHandle
);
//
// Externs
//
extern EFI_LOCK gProtocolDatabaseLock;
extern LIST_ENTRY gHandleList;
extern UINT64 gHandleDatabaseKey;
extern EFI_LOCK gProtocolDatabaseLock;
extern LIST_ENTRY gHandleList;
extern UINT64 gHandleDatabaseKey;
#endif