diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:53:56 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | e7108d0e9655b1795c94ac372b0449f28dd907df (patch) | |
tree | b153716589979b9e42e9b85281ff8b7511ba272f /EmbeddedPkg/RealTimeClockRuntimeDxe | |
parent | 731c67e1d77b7741a91762d17659fc9fbcb9e305 (diff) | |
download | edk2-e7108d0e9655b1795c94ac372b0449f28dd907df.zip edk2-e7108d0e9655b1795c94ac372b0449f28dd907df.tar.gz edk2-e7108d0e9655b1795c94ac372b0449f28dd907df.tar.bz2 |
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 <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: Andrew Fish <afish@apple.com>
Diffstat (limited to 'EmbeddedPkg/RealTimeClockRuntimeDxe')
-rw-r--r-- | EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c index 85650a6..308e8cf 100644 --- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c +++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c @@ -26,12 +26,12 @@ EFI_HANDLE mHandle = NULL; // variable instead.
//
typedef struct {
- INT16 TimeZone;
- UINT8 Daylight;
+ INT16 TimeZone;
+ UINT8 Daylight;
} NON_VOLATILE_TIME_SETTINGS;
-STATIC CONST CHAR16 mTimeSettingsVariableName[] = L"RtcTimeSettings";
-STATIC NON_VOLATILE_TIME_SETTINGS mTimeSettings;
+STATIC CONST CHAR16 mTimeSettingsVariableName[] = L"RtcTimeSettings";
+STATIC NON_VOLATILE_TIME_SETTINGS mTimeSettings;
/**
Returns the current time and date information, and the time-keeping capabilities
@@ -49,8 +49,8 @@ STATIC NON_VOLATILE_TIME_SETTINGS mTimeSettings; EFI_STATUS
EFIAPI
GetTime (
- OUT EFI_TIME *Time,
- OUT EFI_TIME_CAPABILITIES *Capabilities
+ OUT EFI_TIME *Time,
+ OUT EFI_TIME_CAPABILITIES *Capabilities
)
{
if (Time == NULL) {
@@ -67,8 +67,6 @@ GetTime ( return LibGetTime (Time, Capabilities);
}
-
-
/**
Sets the current local time and date information.
@@ -82,23 +80,23 @@ GetTime ( EFI_STATUS
EFIAPI
SetTime (
- IN EFI_TIME *Time
+ IN EFI_TIME *Time
)
{
- EFI_STATUS Status;
- BOOLEAN TimeSettingsChanged;
+ EFI_STATUS Status;
+ BOOLEAN TimeSettingsChanged;
- if (Time == NULL || !IsTimeValid (Time)) {
+ if ((Time == NULL) || !IsTimeValid (Time)) {
return EFI_INVALID_PARAMETER;
}
TimeSettingsChanged = FALSE;
- if (mTimeSettings.TimeZone != Time->TimeZone ||
- mTimeSettings.Daylight != Time->Daylight) {
-
+ if ((mTimeSettings.TimeZone != Time->TimeZone) ||
+ (mTimeSettings.Daylight != Time->Daylight))
+ {
mTimeSettings.TimeZone = Time->TimeZone;
mTimeSettings.Daylight = Time->Daylight;
- TimeSettingsChanged = TRUE;
+ TimeSettingsChanged = TRUE;
}
Status = LibSetTime (Time);
@@ -114,15 +112,16 @@ SetTime ( EFI_VARIABLE_BOOTSERVICE_ACCESS |
EFI_VARIABLE_RUNTIME_ACCESS,
sizeof (mTimeSettings),
- (VOID *)&mTimeSettings);
+ (VOID *)&mTimeSettings
+ );
if (EFI_ERROR (Status)) {
return EFI_DEVICE_ERROR;
}
}
+
return EFI_SUCCESS;
}
-
/**
Returns the current wakeup alarm clock setting.
@@ -138,12 +137,12 @@ SetTime ( EFI_STATUS
EFIAPI
GetWakeupTime (
- OUT BOOLEAN *Enabled,
- OUT BOOLEAN *Pending,
- OUT EFI_TIME *Time
+ OUT BOOLEAN *Enabled,
+ OUT BOOLEAN *Pending,
+ OUT EFI_TIME *Time
)
{
- if (Time == NULL || Enabled == NULL || Pending == NULL) {
+ if ((Time == NULL) || (Enabled == NULL) || (Pending == NULL)) {
return EFI_INVALID_PARAMETER;
}
@@ -157,7 +156,6 @@ GetWakeupTime ( return LibGetWakeupTime (Enabled, Pending, Time);
}
-
/**
Sets the system wakeup alarm clock time.
@@ -174,15 +172,13 @@ GetWakeupTime ( EFI_STATUS
EFIAPI
SetWakeupTime (
- IN BOOLEAN Enabled,
- OUT EFI_TIME *Time
+ IN BOOLEAN Enabled,
+ OUT EFI_TIME *Time
)
{
return LibSetWakeupTime (Enabled, Time);
}
-
-
/**
This is the declaration of an EFI image entry point. This can be the entry point to an application
written to this specification, an EFI boot service driver, or an EFI runtime driver.
@@ -196,8 +192,8 @@ SetWakeupTime ( EFI_STATUS
EFIAPI
InitializeRealTimeClock (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_STATUS Status;
@@ -208,14 +204,23 @@ InitializeRealTimeClock ( return Status;
}
- Size = sizeof (mTimeSettings);
- Status = EfiGetVariable ((CHAR16 *)mTimeSettingsVariableName,
- &gEfiCallerIdGuid, NULL, &Size, (VOID *)&mTimeSettings);
+ Size = sizeof (mTimeSettings);
+ Status = EfiGetVariable (
+ (CHAR16 *)mTimeSettingsVariableName,
+ &gEfiCallerIdGuid,
+ NULL,
+ &Size,
+ (VOID *)&mTimeSettings
+ );
if (EFI_ERROR (Status) ||
!IsValidTimeZone (mTimeSettings.TimeZone) ||
- !IsValidDaylight (mTimeSettings.Daylight)) {
- DEBUG ((DEBUG_WARN, "%a: using default timezone/daylight settings\n",
- __FUNCTION__));
+ !IsValidDaylight (mTimeSettings.Daylight))
+ {
+ DEBUG ((
+ DEBUG_WARN,
+ "%a: using default timezone/daylight settings\n",
+ __FUNCTION__
+ ));
mTimeSettings.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
mTimeSettings.Daylight = 0;
@@ -235,4 +240,3 @@ InitializeRealTimeClock ( return Status;
}
-
|