Skip to content

Commit e7108d0

Browse files
makubackimergify[bot]
authored andcommitted
EmbeddedPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the EmbeddedPkg package Cc: Andrew Fish <[email protected]> Cc: Leif Lindholm <[email protected]> Cc: Michael D Kinney <[email protected]> Signed-off-by: Michael Kubacki <[email protected]> Reviewed-by: Andrew Fish <[email protected]>
1 parent 731c67e commit e7108d0

File tree

106 files changed

+9431
-7837
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+9431
-7837
lines changed

EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c

+26-15
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,31 @@
2020
/* Validate the node is media hard drive type */
2121
EFI_STATUS
2222
ValidateAndroidMediaDevicePath (
23-
IN EFI_DEVICE_PATH *DevicePath
23+
IN EFI_DEVICE_PATH *DevicePath
2424
)
2525
{
26-
EFI_DEVICE_PATH_PROTOCOL *Node, *NextNode;
26+
EFI_DEVICE_PATH_PROTOCOL *Node, *NextNode;
2727

2828
NextNode = DevicePath;
2929
while (NextNode != NULL) {
3030
Node = NextNode;
31-
if (Node->Type == MEDIA_DEVICE_PATH &&
32-
Node->SubType == MEDIA_HARDDRIVE_DP) {
31+
if ((Node->Type == MEDIA_DEVICE_PATH) &&
32+
(Node->SubType == MEDIA_HARDDRIVE_DP))
33+
{
3334
return EFI_SUCCESS;
3435
}
36+
3537
NextNode = NextDevicePathNode (Node);
3638
}
39+
3740
return EFI_INVALID_PARAMETER;
3841
}
3942

4043
EFI_STATUS
4144
EFIAPI
4245
AndroidBootAppEntryPoint (
43-
IN EFI_HANDLE ImageHandle,
44-
IN EFI_SYSTEM_TABLE *SystemTable
46+
IN EFI_HANDLE ImageHandle,
47+
IN EFI_SYSTEM_TABLE *SystemTable
4548
)
4649
{
4750
EFI_STATUS Status;
@@ -56,9 +59,12 @@ AndroidBootAppEntryPoint (
5659

5760
BootPathStr = (CHAR16 *)PcdGetPtr (PcdAndroidBootDevicePath);
5861
ASSERT (BootPathStr != NULL);
59-
Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL,
60-
(VOID **)&EfiDevicePathFromTextProtocol);
61-
ASSERT_EFI_ERROR(Status);
62+
Status = gBS->LocateProtocol (
63+
&gEfiDevicePathFromTextProtocolGuid,
64+
NULL,
65+
(VOID **)&EfiDevicePathFromTextProtocol
66+
);
67+
ASSERT_EFI_ERROR (Status);
6268
DevicePath = (EFI_DEVICE_PATH *)EfiDevicePathFromTextProtocol->ConvertTextToDevicePath (BootPathStr);
6369
ASSERT (DevicePath != NULL);
6470

@@ -67,16 +73,19 @@ AndroidBootAppEntryPoint (
6773
return Status;
6874
}
6975

70-
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid,
71-
&DevicePath, &Handle);
76+
Status = gBS->LocateDevicePath (
77+
&gEfiDevicePathProtocolGuid,
78+
&DevicePath,
79+
&Handle
80+
);
7281
if (EFI_ERROR (Status)) {
7382
return Status;
7483
}
7584

7685
Status = gBS->OpenProtocol (
7786
Handle,
7887
&gEfiBlockIoProtocolGuid,
79-
(VOID **) &BlockIo,
88+
(VOID **)&BlockIo,
8089
gImageHandle,
8190
NULL,
8291
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -86,12 +95,13 @@ AndroidBootAppEntryPoint (
8695
return Status;
8796
}
8897

89-
MediaId = BlockIo->Media->MediaId;
98+
MediaId = BlockIo->Media->MediaId;
9099
BlockSize = BlockIo->Media->BlockSize;
91-
Buffer = AllocatePages (EFI_SIZE_TO_PAGES (sizeof(ANDROID_BOOTIMG_HEADER)));
100+
Buffer = AllocatePages (EFI_SIZE_TO_PAGES (sizeof (ANDROID_BOOTIMG_HEADER)));
92101
if (Buffer == NULL) {
93102
return EFI_BUFFER_TOO_SMALL;
94103
}
104+
95105
/* Load header of boot.img */
96106
Status = BlockIo->ReadBlocks (
97107
BlockIo,
@@ -105,8 +115,9 @@ AndroidBootAppEntryPoint (
105115
DEBUG ((DEBUG_ERROR, "Failed to get AndroidBootImg Size: %r\n", Status));
106116
return Status;
107117
}
118+
108119
BootImgSize = ALIGN_VALUE (BootImgSize, BlockSize);
109-
FreePages (Buffer, EFI_SIZE_TO_PAGES (sizeof(ANDROID_BOOTIMG_HEADER)));
120+
FreePages (Buffer, EFI_SIZE_TO_PAGES (sizeof (ANDROID_BOOTIMG_HEADER)));
110121

111122
/* Both PartitionStart and PartitionSize are counted as block size. */
112123
Buffer = AllocatePages (EFI_SIZE_TO_PAGES (BootImgSize));

EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c

+25-17
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,28 @@
1616
// present, but RamdiskSize will be set to 0.
1717
EFI_STATUS
1818
ParseAndroidBootImg (
19-
IN VOID *BootImg,
19+
IN VOID *BootImg,
2020
OUT VOID **Kernel,
21-
OUT UINTN *KernelSize,
21+
OUT UINTN *KernelSize,
2222
OUT VOID **Ramdisk,
23-
OUT UINTN *RamdiskSize,
24-
OUT CHAR8 *KernelArgs
23+
OUT UINTN *RamdiskSize,
24+
OUT CHAR8 *KernelArgs
2525
)
2626
{
27-
ANDROID_BOOTIMG_HEADER *Header;
28-
UINT8 *BootImgBytePtr;
27+
ANDROID_BOOTIMG_HEADER *Header;
28+
UINT8 *BootImgBytePtr;
2929

3030
// Cast to UINT8 so we can do pointer arithmetic
31-
BootImgBytePtr = (UINT8 *) BootImg;
31+
BootImgBytePtr = (UINT8 *)BootImg;
3232

33-
Header = (ANDROID_BOOTIMG_HEADER *) BootImg;
33+
Header = (ANDROID_BOOTIMG_HEADER *)BootImg;
3434

35-
if (AsciiStrnCmp ((CONST CHAR8 *)Header->BootMagic, ANDROID_BOOT_MAGIC,
36-
ANDROID_BOOT_MAGIC_LENGTH) != 0) {
35+
if (AsciiStrnCmp (
36+
(CONST CHAR8 *)Header->BootMagic,
37+
ANDROID_BOOT_MAGIC,
38+
ANDROID_BOOT_MAGIC_LENGTH
39+
) != 0)
40+
{
3741
return EFI_INVALID_PARAMETER;
3842
}
3943

@@ -43,18 +47,22 @@ ParseAndroidBootImg (
4347

4448
ASSERT (IS_VALID_ANDROID_PAGE_SIZE (Header->PageSize));
4549

46-
*KernelSize = Header->KernelSize;
47-
*Kernel = BootImgBytePtr + Header->PageSize;
50+
*KernelSize = Header->KernelSize;
51+
*Kernel = BootImgBytePtr + Header->PageSize;
4852
*RamdiskSize = Header->RamdiskSize;
4953

5054
if (Header->RamdiskSize != 0) {
51-
*Ramdisk = (VOID *) (BootImgBytePtr
52-
+ Header->PageSize
53-
+ ALIGN_VALUE (Header->KernelSize, Header->PageSize));
55+
*Ramdisk = (VOID *)(BootImgBytePtr
56+
+ Header->PageSize
57+
+ ALIGN_VALUE (Header->KernelSize, Header->PageSize));
5458
}
5559

56-
AsciiStrnCpyS (KernelArgs, ANDROID_BOOTIMG_KERNEL_ARGS_SIZE, Header->KernelArgs,
57-
ANDROID_BOOTIMG_KERNEL_ARGS_SIZE);
60+
AsciiStrnCpyS (
61+
KernelArgs,
62+
ANDROID_BOOTIMG_KERNEL_ARGS_SIZE,
63+
Header->KernelArgs,
64+
ANDROID_BOOTIMG_KERNEL_ARGS_SIZE
65+
);
5866

5967
return EFI_SUCCESS;
6068
}

0 commit comments

Comments
 (0)