diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:02 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 1436aea4d5707e672672a11bda72be2c63c936c3 (patch) | |
tree | 370c9d5bd8823aa8ea7bce71a0f29bff71feff67 /MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c | |
parent | 7c7184e201a90a1d2376e615e55e3f4074731468 (diff) | |
download | edk2-1436aea4d5707e672672a11bda72be2c63c936c3.tar.gz edk2-1436aea4d5707e672672a11bda72be2c63c936c3.tar.bz2 edk2-1436aea4d5707e672672a11bda72be2c63c936c3.zip |
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>
Diffstat (limited to 'MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c')
-rw-r--r-- | MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c index d16872e145..57f15d49ea 100644 --- a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c +++ b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.c @@ -132,36 +132,36 @@ EFI_BOOT_LOGO_PROTOCOL mBootLogoProtocolTemplate = { ///
/// Boot Logo 2 Protocol instance
///
-EDKII_BOOT_LOGO2_PROTOCOL mBootLogo2ProtocolTemplate = {
+EDKII_BOOT_LOGO2_PROTOCOL mBootLogo2ProtocolTemplate = {
SetBootLogo2,
GetBootLogo2
};
EFI_EVENT mBootGraphicsReadyToBootEvent;
UINTN mBootGraphicsResourceTableKey = 0;
-BOOLEAN mIsLogoValid = FALSE;
-EFI_GRAPHICS_OUTPUT_BLT_PIXEL *mLogoBltBuffer = NULL;
-UINTN mLogoDestX = 0;
-UINTN mLogoDestY = 0;
-UINTN mLogoWidth = 0;
-UINTN mLogoHeight = 0;
-BOOLEAN mAcpiBgrtInstalled = FALSE;
-BOOLEAN mAcpiBgrtStatusChanged = FALSE;
-BOOLEAN mAcpiBgrtBufferChanged = FALSE;
+BOOLEAN mIsLogoValid = FALSE;
+EFI_GRAPHICS_OUTPUT_BLT_PIXEL *mLogoBltBuffer = NULL;
+UINTN mLogoDestX = 0;
+UINTN mLogoDestY = 0;
+UINTN mLogoWidth = 0;
+UINTN mLogoHeight = 0;
+BOOLEAN mAcpiBgrtInstalled = FALSE;
+BOOLEAN mAcpiBgrtStatusChanged = FALSE;
+BOOLEAN mAcpiBgrtBufferChanged = FALSE;
//
// ACPI Boot Graphics Resource Table template
//
-EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE mBootGraphicsResourceTableTemplate = {
+EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE mBootGraphicsResourceTableTemplate = {
{
EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE,
sizeof (EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE),
- EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION, // Revision
- 0x00, // Checksum will be updated at runtime
+ EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE_REVISION, // Revision
+ 0x00, // Checksum will be updated at runtime
//
// It is expected that these values will be updated at EntryPoint.
//
- {0x00}, // OEM ID is a 6 bytes long field
+ { 0x00 }, // OEM ID is a 6 bytes long field
0x00, // OEM Table ID(8 bytes long)
0x00, // OEM Revision
0x00, // Creator ID
@@ -196,12 +196,12 @@ EFI_ACPI_5_0_BOOT_GRAPHICS_RESOURCE_TABLE mBootGraphicsResourceTableTemplate = { EFI_STATUS
EFIAPI
SetBootLogo (
- IN EFI_BOOT_LOGO_PROTOCOL *This,
- IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
- IN UINTN DestinationX,
- IN UINTN DestinationY,
- IN UINTN Width,
- IN UINTN Height
+ IN EFI_BOOT_LOGO_PROTOCOL *This,
+ IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
+ IN UINTN DestinationX,
+ IN UINTN DestinationY,
+ IN UINTN Width,
+ IN UINTN Height
)
{
//
@@ -250,7 +250,7 @@ SetBootLogo2 ( UINT32 Result32;
if (BltBuffer == NULL) {
- mIsLogoValid = FALSE;
+ mIsLogoValid = FALSE;
mAcpiBgrtStatusChanged = TRUE;
return EFI_SUCCESS;
}
@@ -258,7 +258,7 @@ SetBootLogo2 ( //
// Width and height are not allowed to be zero.
//
- if (Width == 0 || Height == 0) {
+ if ((Width == 0) || (Height == 0)) {
return EFI_INVALID_PARAMETER;
}
@@ -270,14 +270,17 @@ SetBootLogo2 ( if (EFI_ERROR (Status)) {
return EFI_INVALID_PARAMETER;
}
+
Status = SafeUintnToUint32 (DestinationY, &Result32);
if (EFI_ERROR (Status)) {
return EFI_INVALID_PARAMETER;
}
+
Status = SafeUintnToUint32 (Width, &Result32);
if (EFI_ERROR (Status)) {
return EFI_INVALID_PARAMETER;
}
+
Status = SafeUintnToUint32 (Height, &Result32);
if (EFI_ERROR (Status)) {
return EFI_INVALID_PARAMETER;
@@ -295,6 +298,7 @@ SetBootLogo2 ( if (EFI_ERROR (Status)) {
return EFI_UNSUPPORTED;
}
+
Status = SafeUintnMult (
BufferSize,
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL),
@@ -382,8 +386,9 @@ GetBootLogo2 ( //
// Make sure none of the boot logo location parameters are NULL.
//
- if (BltBuffer == NULL || DestinationX == NULL || DestinationY == NULL ||
- Width == NULL || Height == NULL) {
+ if ((BltBuffer == NULL) || (DestinationX == NULL) || (DestinationY == NULL) ||
+ (Width == NULL) || (Height == NULL))
+ {
return EFI_INVALID_PARAMETER;
}
@@ -425,7 +430,7 @@ BgrtReadyToBootEventNotify ( Status = gBS->LocateProtocol (
&gEfiAcpiTableProtocolGuid,
NULL,
- (VOID **) &AcpiTableProtocol
+ (VOID **)&AcpiTableProtocol
);
if (EFI_ERROR (Status)) {
return;
@@ -475,13 +480,13 @@ BgrtReadyToBootEventNotify ( // so the BMP image is allocated by TranslateGopBltToBmp().
//
ImageBuffer = NULL;
- Status = TranslateGopBltToBmp (
- mLogoBltBuffer,
- (UINT32)mLogoHeight,
- (UINT32)mLogoWidth,
- &ImageBuffer,
- &BmpSize
- );
+ Status = TranslateGopBltToBmp (
+ mLogoBltBuffer,
+ (UINT32)mLogoHeight,
+ (UINT32)mLogoWidth,
+ &ImageBuffer,
+ &BmpSize
+ );
if (EFI_ERROR (Status)) {
return;
}
|