diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:53:52 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | 2b16a4fb91b9b31c0d152588f5ac51080c6c0763 (patch) | |
tree | 72c352a8e807a4720c1675a755969206c6370588 /ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib | |
parent | 40b0b23ed34f48c26d711d3e4613a4bb35eeadff (diff) | |
download | edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.tar.gz edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.tar.bz2 edk2-2b16a4fb91b9b31c0d152588f5ac51080c6c0763.zip |
ArmVirtPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the ArmVirtPkg 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: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib')
-rw-r--r-- | ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.c | 102 |
1 files changed, 55 insertions, 47 deletions
diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.c b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.c index 394a04e3c3..03d14fe432 100644 --- a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.c +++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.c @@ -34,20 +34,20 @@ DiscoverPsciMethod ( VOID
)
{
- VOID *DeviceTreeBase;
- INT32 Node, Prev;
- INT32 Len;
- CONST CHAR8 *Compatible;
- CONST CHAR8 *CompatibleItem;
- CONST VOID *Prop;
-
- DeviceTreeBase = (VOID*)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress);
+ VOID *DeviceTreeBase;
+ INT32 Node, Prev;
+ INT32 Len;
+ CONST CHAR8 *Compatible;
+ CONST CHAR8 *CompatibleItem;
+ CONST VOID *Prop;
+
+ DeviceTreeBase = (VOID *)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress);
ASSERT (fdt_check_header (DeviceTreeBase) == 0);
//
// Enumerate all FDT nodes looking for the PSCI node and capture the method
//
- for (Prev = 0;; Prev = Node) {
+ for (Prev = 0; ; Prev = Node) {
Node = fdt_next_node (DeviceTreeBase, Prev, NULL);
if (Node < 0) {
break;
@@ -62,16 +62,19 @@ DiscoverPsciMethod ( // Iterate over the NULL-separated items in the compatible string
//
for (CompatibleItem = Compatible; CompatibleItem < Compatible + Len;
- CompatibleItem += 1 + AsciiStrLen (CompatibleItem)) {
-
+ CompatibleItem += 1 + AsciiStrLen (CompatibleItem))
+ {
if (AsciiStrCmp (CompatibleItem, "arm,psci-0.2") != 0) {
continue;
}
Prop = fdt_getprop (DeviceTreeBase, Node, "method", NULL);
if (!Prop) {
- DEBUG ((DEBUG_ERROR, "%a: Missing PSCI method property\n",
- __FUNCTION__));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: Missing PSCI method property\n",
+ __FUNCTION__
+ ));
return PsciMethodUnknown;
}
@@ -80,39 +83,44 @@ DiscoverPsciMethod ( } else if (AsciiStrnCmp (Prop, "smc", 3) == 0) {
return PsciMethodSmc;
} else {
- DEBUG ((DEBUG_ERROR, "%a: Unknown PSCI method \"%a\"\n", __FUNCTION__,
- Prop));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a: Unknown PSCI method \"%a\"\n",
+ __FUNCTION__,
+ Prop
+ ));
return PsciMethodUnknown;
}
}
}
+
return PsciMethodUnknown;
}
STATIC
VOID
PerformPsciAction (
- IN UINTN Arg0
+ IN UINTN Arg0
)
{
- ARM_SMC_ARGS ArmSmcArgs;
- ARM_HVC_ARGS ArmHvcArgs;
+ ARM_SMC_ARGS ArmSmcArgs;
+ ARM_HVC_ARGS ArmHvcArgs;
ArmSmcArgs.Arg0 = Arg0;
ArmHvcArgs.Arg0 = Arg0;
switch (DiscoverPsciMethod ()) {
- case PsciMethodHvc:
- ArmCallHvc (&ArmHvcArgs);
- break;
+ case PsciMethodHvc:
+ ArmCallHvc (&ArmHvcArgs);
+ break;
- case PsciMethodSmc:
- ArmCallSmc (&ArmSmcArgs);
- break;
+ case PsciMethodSmc:
+ ArmCallSmc (&ArmSmcArgs);
+ break;
- default:
- DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__));
- ASSERT (FALSE);
+ default:
+ DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__));
+ ASSERT (FALSE);
}
}
@@ -180,8 +188,8 @@ ResetShutdown ( VOID
EFIAPI
ResetPlatformSpecific (
- IN UINTN DataSize,
- IN VOID *ResetData
+ IN UINTN DataSize,
+ IN VOID *ResetData
)
{
// Map the platform specific reset as reboot
@@ -203,30 +211,30 @@ ResetPlatformSpecific ( VOID
EFIAPI
ResetSystem (
- 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
)
{
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;
}
}
|