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,21 +9,21 @@
#include "ResetSystem.h"
GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 *mResetTypeStr[] = {
GLOBAL_REMOVE_IF_UNREFERENCED CHAR16 *mResetTypeStr[] = {
L"Cold", L"Warm", L"Shutdown", L"PlatformSpecific"
};
EFI_PEI_RESET2_PPI mPpiReset2 = {
EFI_PEI_RESET2_PPI mPpiReset2 = {
ResetSystem2
};
EFI_GUID *mProcessingOrder[] = {
EFI_GUID *mProcessingOrder[] = {
&gEdkiiPlatformSpecificResetFilterPpiGuid,
&gEdkiiPlatformSpecificResetNotificationPpiGuid,
&gEdkiiPlatformSpecificResetHandlerPpiGuid
};
RESET_FILTER_INSTANCE mResetFilter = {
RESET_FILTER_INSTANCE mResetFilter = {
{
RegisterResetNotify,
UnregisterResetNotify
@@ -31,7 +31,7 @@ RESET_FILTER_INSTANCE mResetFilter = {
&gEdkiiPlatformSpecificResetFilterPpiGuid
};
RESET_FILTER_INSTANCE mResetNotification = {
RESET_FILTER_INSTANCE mResetNotification = {
{
RegisterResetNotify,
UnregisterResetNotify
@@ -39,7 +39,7 @@ RESET_FILTER_INSTANCE mResetNotification = {
&gEdkiiPlatformSpecificResetNotificationPpiGuid
};
RESET_FILTER_INSTANCE mResetHandler = {
RESET_FILTER_INSTANCE mResetHandler = {
{
RegisterResetNotify,
UnregisterResetNotify
@@ -47,7 +47,7 @@ RESET_FILTER_INSTANCE mResetHandler = {
&gEdkiiPlatformSpecificResetHandlerPpiGuid
};
EFI_PEI_PPI_DESCRIPTOR mPpiListReset[] = {
EFI_PEI_PPI_DESCRIPTOR mPpiListReset[] = {
{
EFI_PEI_PPI_DESCRIPTOR_PPI,
&gEfiPeiReset2PpiGuid,
@@ -94,24 +94,25 @@ EFI_PEI_PPI_DESCRIPTOR mPpiListReset[] = {
EFI_STATUS
EFIAPI
RegisterResetNotify (
IN EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI *This,
IN EFI_RESET_SYSTEM ResetFunction
IN EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI *This,
IN EFI_RESET_SYSTEM ResetFunction
)
{
RESET_FILTER_INSTANCE *ResetFilter;
RESET_FILTER_LIST *List;
VOID *Hob;
UINTN Index;
RESET_FILTER_INSTANCE *ResetFilter;
RESET_FILTER_LIST *List;
VOID *Hob;
UINTN Index;
if (ResetFunction == NULL) {
return EFI_INVALID_PARAMETER;
}
ResetFilter = (RESET_FILTER_INSTANCE *) This;
ASSERT (CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetFilterPpiGuid) ||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetNotificationPpiGuid) ||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetHandlerPpiGuid)
);
ResetFilter = (RESET_FILTER_INSTANCE *)This;
ASSERT (
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetFilterPpiGuid) ||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetNotificationPpiGuid) ||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetHandlerPpiGuid)
);
Hob = GetFirstGuidHob (ResetFilter->Guid);
if (Hob == NULL) {
@@ -125,6 +126,7 @@ RegisterResetNotify (
if (List == NULL) {
return EFI_OUT_OF_RESOURCES;
}
List->Signature = RESET_FILTER_LIST_SIGNATURE;
List->Count = PcdGet32 (PcdMaximumPeiResetNotifies);
ZeroMem (List->ResetFilters, sizeof (EFI_RESET_SYSTEM) * List->Count);
@@ -141,6 +143,7 @@ RegisterResetNotify (
break;
}
}
if (Index != List->Count) {
return EFI_ALREADY_STARTED;
}
@@ -157,6 +160,7 @@ RegisterResetNotify (
if (Index == List->Count) {
return EFI_OUT_OF_RESOURCES;
}
List->ResetFilters[Index] = ResetFunction;
return EFI_SUCCESS;
}
@@ -180,25 +184,25 @@ RegisterResetNotify (
EFI_STATUS
EFIAPI
UnregisterResetNotify (
IN EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI *This,
IN EFI_RESET_SYSTEM ResetFunction
IN EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI *This,
IN EFI_RESET_SYSTEM ResetFunction
)
{
RESET_FILTER_INSTANCE *ResetFilter;
RESET_FILTER_LIST *List;
VOID *Hob;
UINTN Index;
RESET_FILTER_INSTANCE *ResetFilter;
RESET_FILTER_LIST *List;
VOID *Hob;
UINTN Index;
if (ResetFunction == NULL) {
return EFI_INVALID_PARAMETER;
}
ResetFilter = (RESET_FILTER_INSTANCE *)This;
ASSERT (CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetFilterPpiGuid) ||
ASSERT (
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetFilterPpiGuid) ||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetNotificationPpiGuid) ||
CompareGuid (ResetFilter->Guid, &gEdkiiPlatformSpecificResetHandlerPpiGuid)
);
);
Hob = GetFirstGuidHob (ResetFilter->Guid);
if (Hob == NULL) {
@@ -221,7 +225,6 @@ UnregisterResetNotify (
return EFI_SUCCESS;
}
/**
The PEIM's entry point.
@@ -273,29 +276,30 @@ InitializeResetSystem (
VOID
EFIAPI
ResetSystem2 (
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
)
{
VOID *Hob;
UINTN Index;
RESET_FILTER_LIST *List;
UINTN OrderIndex;
UINT8 RecursionDepth;
UINT8 *RecursionDepthPointer;
VOID *Hob;
UINTN Index;
RESET_FILTER_LIST *List;
UINTN OrderIndex;
UINT8 RecursionDepth;
UINT8 *RecursionDepthPointer;
//
// The recursion depth is stored in GUIDed HOB using gEfiCallerIdGuid.
//
Hob = GetFirstGuidHob (&gEfiCallerIdGuid);
if (Hob == NULL) {
RecursionDepth = 0;
RecursionDepth = 0;
RecursionDepthPointer = BuildGuidDataHob (&gEfiCallerIdGuid, &RecursionDepth, sizeof (RecursionDepth));
} else {
RecursionDepthPointer = (UINT8 *)GET_GUID_HOB_DATA (Hob);
}
//
// Only do REPORT_STATUS_CODE() on first call to ResetSystem()
//
@@ -324,7 +328,7 @@ ResetSystem2 (
for (Index = 0; Index < List->Count; Index++) {
if (List->ResetFilters[Index] != NULL) {
List->ResetFilters[Index] (ResetType, ResetStatus, DataSize, ResetData);
List->ResetFilters[Index](ResetType, ResetStatus, DataSize, ResetData);
}
}
}
@@ -335,24 +339,24 @@ ResetSystem2 (
}
switch (ResetType) {
case EfiResetWarm:
ResetWarm ();
break;
case EfiResetWarm:
ResetWarm ();
break;
case EfiResetCold:
ResetCold ();
break;
case EfiResetCold:
ResetCold ();
break;
case EfiResetShutdown:
ResetShutdown ();
return ;
case EfiResetShutdown:
ResetShutdown ();
return;
case EfiResetPlatformSpecific:
ResetPlatformSpecific (DataSize, ResetData);
return;
case EfiResetPlatformSpecific:
ResetPlatformSpecific (DataSize, ResetData);
return;
default:
return ;
default:
return;
}
//

View File

@@ -9,7 +9,6 @@
#ifndef _RESET_SYSTEM2_H_
#define _RESET_SYSTEM2_H_
#include <Uefi.h>
#include <PiPei.h>
@@ -26,26 +25,24 @@
#include <Library/ResetSystemLib.h>
#include <Library/ReportStatusCodeLib.h>
//
// The maximum recursion depth to ResetSystem() by reset notification handlers
//
#define MAX_RESET_NOTIFY_DEPTH 10
#define MAX_RESET_NOTIFY_DEPTH 10
//
// Data to put in GUIDed HOB
//
typedef struct {
UINT32 Signature;
UINT32 Count;
EFI_RESET_SYSTEM ResetFilters[0]; // ResetFilters[PcdGet32 (PcdMaximumResetNotifies)]
UINT32 Signature;
UINT32 Count;
EFI_RESET_SYSTEM ResetFilters[0]; // ResetFilters[PcdGet32 (PcdMaximumResetNotifies)]
} RESET_FILTER_LIST;
#define RESET_FILTER_LIST_SIGNATURE SIGNATURE_32('r', 's', 't', 'l')
#define RESET_FILTER_LIST_SIGNATURE SIGNATURE_32('r', 's', 't', 'l')
typedef struct {
EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI ResetFilter;
EFI_GUID *Guid;
EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI ResetFilter;
EFI_GUID *Guid;
} RESET_FILTER_INSTANCE;
/**
@@ -67,11 +64,12 @@ typedef struct {
VOID
EFIAPI
ResetSystem2 (
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
IN EFI_RESET_TYPE ResetType,
IN EFI_STATUS ResetStatus,
IN UINTN DataSize,
IN VOID *ResetData OPTIONAL
);
/**
Register a notification function to be called when ResetSystem() is called.
@@ -93,8 +91,8 @@ ResetSystem2 (
EFI_STATUS
EFIAPI
RegisterResetNotify (
IN EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI *This,
IN EFI_RESET_SYSTEM ResetFunction
IN EDKII_PLATFORM_SPECIFIC_RESET_FILTER_PPI *This,
IN EFI_RESET_SYSTEM ResetFunction
);
/**
@@ -115,7 +113,8 @@ RegisterResetNotify (
EFI_STATUS
EFIAPI
UnregisterResetNotify (
IN EFI_RESET_NOTIFICATION_PROTOCOL *This,
IN EFI_RESET_SYSTEM ResetFunction
IN EFI_RESET_NOTIFICATION_PROTOCOL *This,
IN EFI_RESET_SYSTEM ResetFunction
);
#endif