MdePkg: Apply uncrustify changes

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

Apply uncrustify changes to .c/.h files in the MdePkg 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:05 -08:00
committed by mergify[bot]
parent 1436aea4d5
commit 2f88bd3a12
975 changed files with 55681 additions and 57790 deletions

View File

@@ -13,12 +13,11 @@
**/
#include "UefiDevicePathLib.h"
GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathLibDevicePathUtilities = NULL;
GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathLibDevicePathToText = NULL;
GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLibDevicePathFromText = NULL;
GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_UTILITIES_PROTOCOL *mDevicePathLibDevicePathUtilities = NULL;
GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathLibDevicePathToText = NULL;
GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLibDevicePathFromText = NULL;
/**
The constructor function caches the pointer to DevicePathUtilites protocol,
@@ -37,16 +36,16 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mDevicePathLib
EFI_STATUS
EFIAPI
UefiDevicePathLibOptionalDevicePathProtocolConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
EFI_STATUS Status;
Status = gBS->LocateProtocol (
&gEfiDevicePathUtilitiesProtocolGuid,
NULL,
(VOID**) &mDevicePathLibDevicePathUtilities
(VOID **)&mDevicePathLibDevicePathUtilities
);
ASSERT_EFI_ERROR (Status);
ASSERT (mDevicePathLibDevicePathUtilities != NULL);
@@ -256,8 +255,8 @@ AppendDevicePathInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
GetNextDevicePathInstance (
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
OUT UINTN *Size
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath,
OUT UINTN *Size
)
{
if (mDevicePathLibDevicePathUtilities != NULL) {
@@ -289,9 +288,9 @@ GetNextDevicePathInstance (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
CreateDeviceNode (
IN UINT8 NodeType,
IN UINT8 NodeSubType,
IN UINT16 NodeLength
IN UINT8 NodeType,
IN UINT8 NodeSubType,
IN UINT16 NodeLength
)
{
if (mDevicePathLibDevicePathUtilities != NULL) {
@@ -338,15 +337,16 @@ IsDevicePathMultiInstance (
**/
VOID *
UefiDevicePathLibLocateProtocol (
EFI_GUID *ProtocolGuid
EFI_GUID *ProtocolGuid
)
{
EFI_STATUS Status;
VOID *Protocol;
EFI_STATUS Status;
VOID *Protocol;
Status = gBS->LocateProtocol (
ProtocolGuid,
NULL,
(VOID**) &Protocol
(VOID **)&Protocol
);
if (EFI_ERROR (Status)) {
return NULL;
@@ -381,6 +381,7 @@ ConvertDeviceNodeToText (
if (mDevicePathLibDevicePathToText == NULL) {
mDevicePathLibDevicePathToText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathToTextProtocolGuid);
}
if (mDevicePathLibDevicePathToText != NULL) {
return mDevicePathLibDevicePathToText->ConvertDeviceNodeToText (DeviceNode, DisplayOnly, AllowShortcuts);
}
@@ -406,14 +407,15 @@ ConvertDeviceNodeToText (
CHAR16 *
EFIAPI
ConvertDevicePathToText (
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN BOOLEAN DisplayOnly,
IN BOOLEAN AllowShortcuts
)
{
if (mDevicePathLibDevicePathToText == NULL) {
mDevicePathLibDevicePathToText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathToTextProtocolGuid);
}
if (mDevicePathLibDevicePathToText != NULL) {
return mDevicePathLibDevicePathToText->ConvertDevicePathToText (DevicePath, DisplayOnly, AllowShortcuts);
}
@@ -435,12 +437,13 @@ ConvertDevicePathToText (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
ConvertTextToDeviceNode (
IN CONST CHAR16 *TextDeviceNode
IN CONST CHAR16 *TextDeviceNode
)
{
if (mDevicePathLibDevicePathFromText == NULL) {
mDevicePathLibDevicePathFromText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathFromTextProtocolGuid);
}
if (mDevicePathLibDevicePathFromText != NULL) {
return mDevicePathLibDevicePathFromText->ConvertTextToDeviceNode (TextDeviceNode);
}
@@ -463,12 +466,13 @@ ConvertTextToDeviceNode (
EFI_DEVICE_PATH_PROTOCOL *
EFIAPI
ConvertTextToDevicePath (
IN CONST CHAR16 *TextDevicePath
IN CONST CHAR16 *TextDevicePath
)
{
if (mDevicePathLibDevicePathFromText == NULL) {
mDevicePathLibDevicePathFromText = UefiDevicePathLibLocateProtocol (&gEfiDevicePathFromTextProtocolGuid);
}
if (mDevicePathLibDevicePathFromText != NULL) {
return mDevicePathLibDevicePathFromText->ConvertTextToDevicePath (TextDevicePath);
}