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/Variable/RuntimeDxe/VariableRuntimeCache.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/Variable/RuntimeDxe/VariableRuntimeCache.c')
-rw-r--r-- | MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.c | 101 |
1 files changed, 53 insertions, 48 deletions
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.c index bc93cc07d2..9bb30bc1e8 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeCache.c @@ -15,8 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "VariableParsing.h"
#include "VariableRuntimeCache.h"
-extern VARIABLE_MODULE_GLOBAL *mVariableModuleGlobal;
-extern VARIABLE_STORE_HEADER *mNvVariableCache;
+extern VARIABLE_MODULE_GLOBAL *mVariableModuleGlobal;
+extern VARIABLE_STORE_HEADER *mNvVariableCache;
/**
Copies any pending updates to runtime variable caches.
@@ -30,28 +30,30 @@ FlushPendingRuntimeVariableCacheUpdates ( VOID
)
{
- VARIABLE_RUNTIME_CACHE_CONTEXT *VariableRuntimeCacheContext;
+ VARIABLE_RUNTIME_CACHE_CONTEXT *VariableRuntimeCacheContext;
VariableRuntimeCacheContext = &mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext;
- if (VariableRuntimeCacheContext->VariableRuntimeNvCache.Store == NULL ||
- VariableRuntimeCacheContext->VariableRuntimeVolatileCache.Store == NULL ||
- VariableRuntimeCacheContext->PendingUpdate == NULL) {
+ if ((VariableRuntimeCacheContext->VariableRuntimeNvCache.Store == NULL) ||
+ (VariableRuntimeCacheContext->VariableRuntimeVolatileCache.Store == NULL) ||
+ (VariableRuntimeCacheContext->PendingUpdate == NULL))
+ {
return EFI_UNSUPPORTED;
}
if (*(VariableRuntimeCacheContext->PendingUpdate)) {
- if (VariableRuntimeCacheContext->VariableRuntimeHobCache.Store != NULL &&
- mVariableModuleGlobal->VariableGlobal.HobVariableBase > 0) {
+ if ((VariableRuntimeCacheContext->VariableRuntimeHobCache.Store != NULL) &&
+ (mVariableModuleGlobal->VariableGlobal.HobVariableBase > 0))
+ {
CopyMem (
- (VOID *) (
- ((UINT8 *) (UINTN) VariableRuntimeCacheContext->VariableRuntimeHobCache.Store) +
- VariableRuntimeCacheContext->VariableRuntimeHobCache.PendingUpdateOffset
- ),
- (VOID *) (
- ((UINT8 *) (UINTN) mVariableModuleGlobal->VariableGlobal.HobVariableBase) +
- VariableRuntimeCacheContext->VariableRuntimeHobCache.PendingUpdateOffset
- ),
+ (VOID *)(
+ ((UINT8 *)(UINTN)VariableRuntimeCacheContext->VariableRuntimeHobCache.Store) +
+ VariableRuntimeCacheContext->VariableRuntimeHobCache.PendingUpdateOffset
+ ),
+ (VOID *)(
+ ((UINT8 *)(UINTN)mVariableModuleGlobal->VariableGlobal.HobVariableBase) +
+ VariableRuntimeCacheContext->VariableRuntimeHobCache.PendingUpdateOffset
+ ),
VariableRuntimeCacheContext->VariableRuntimeHobCache.PendingUpdateLength
);
VariableRuntimeCacheContext->VariableRuntimeHobCache.PendingUpdateLength = 0;
@@ -59,33 +61,33 @@ FlushPendingRuntimeVariableCacheUpdates ( }
CopyMem (
- (VOID *) (
- ((UINT8 *) (UINTN) VariableRuntimeCacheContext->VariableRuntimeNvCache.Store) +
- VariableRuntimeCacheContext->VariableRuntimeNvCache.PendingUpdateOffset
- ),
- (VOID *) (
- ((UINT8 *) (UINTN) mNvVariableCache) +
- VariableRuntimeCacheContext->VariableRuntimeNvCache.PendingUpdateOffset
- ),
+ (VOID *)(
+ ((UINT8 *)(UINTN)VariableRuntimeCacheContext->VariableRuntimeNvCache.Store) +
+ VariableRuntimeCacheContext->VariableRuntimeNvCache.PendingUpdateOffset
+ ),
+ (VOID *)(
+ ((UINT8 *)(UINTN)mNvVariableCache) +
+ VariableRuntimeCacheContext->VariableRuntimeNvCache.PendingUpdateOffset
+ ),
VariableRuntimeCacheContext->VariableRuntimeNvCache.PendingUpdateLength
);
VariableRuntimeCacheContext->VariableRuntimeNvCache.PendingUpdateLength = 0;
VariableRuntimeCacheContext->VariableRuntimeNvCache.PendingUpdateOffset = 0;
CopyMem (
- (VOID *) (
- ((UINT8 *) (UINTN) VariableRuntimeCacheContext->VariableRuntimeVolatileCache.Store) +
- VariableRuntimeCacheContext->VariableRuntimeVolatileCache.PendingUpdateOffset
- ),
- (VOID *) (
- ((UINT8 *) (UINTN) mVariableModuleGlobal->VariableGlobal.VolatileVariableBase) +
- VariableRuntimeCacheContext->VariableRuntimeVolatileCache.PendingUpdateOffset
- ),
+ (VOID *)(
+ ((UINT8 *)(UINTN)VariableRuntimeCacheContext->VariableRuntimeVolatileCache.Store) +
+ VariableRuntimeCacheContext->VariableRuntimeVolatileCache.PendingUpdateOffset
+ ),
+ (VOID *)(
+ ((UINT8 *)(UINTN)mVariableModuleGlobal->VariableGlobal.VolatileVariableBase) +
+ VariableRuntimeCacheContext->VariableRuntimeVolatileCache.PendingUpdateOffset
+ ),
VariableRuntimeCacheContext->VariableRuntimeVolatileCache.PendingUpdateLength
);
VariableRuntimeCacheContext->VariableRuntimeVolatileCache.PendingUpdateLength = 0;
VariableRuntimeCacheContext->VariableRuntimeVolatileCache.PendingUpdateOffset = 0;
- *(VariableRuntimeCacheContext->PendingUpdate) = FALSE;
+ *(VariableRuntimeCacheContext->PendingUpdate) = FALSE;
}
return EFI_SUCCESS;
@@ -110,9 +112,9 @@ FlushPendingRuntimeVariableCacheUpdates ( **/
EFI_STATUS
SynchronizeRuntimeVariableCache (
- IN VARIABLE_RUNTIME_CACHE *VariableRuntimeCache,
- IN UINTN Offset,
- IN UINTN Length
+ IN VARIABLE_RUNTIME_CACHE *VariableRuntimeCache,
+ IN UINTN Offset,
+ IN UINTN Length
)
{
if (VariableRuntimeCache == NULL) {
@@ -123,26 +125,29 @@ SynchronizeRuntimeVariableCache ( return EFI_SUCCESS;
}
- if (mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.PendingUpdate == NULL ||
- mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.ReadLock == NULL) {
+ if ((mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.PendingUpdate == NULL) ||
+ (mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.ReadLock == NULL))
+ {
return EFI_UNSUPPORTED;
}
if (*(mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.PendingUpdate) &&
- VariableRuntimeCache->PendingUpdateLength > 0) {
+ (VariableRuntimeCache->PendingUpdateLength > 0))
+ {
VariableRuntimeCache->PendingUpdateLength =
- (UINT32) (
- MAX (
- (UINTN) (VariableRuntimeCache->PendingUpdateOffset + VariableRuntimeCache->PendingUpdateLength),
- Offset + Length
- ) - MIN ((UINTN) VariableRuntimeCache->PendingUpdateOffset, Offset)
- );
+ (UINT32)(
+ MAX (
+ (UINTN)(VariableRuntimeCache->PendingUpdateOffset + VariableRuntimeCache->PendingUpdateLength),
+ Offset + Length
+ ) - MIN ((UINTN)VariableRuntimeCache->PendingUpdateOffset, Offset)
+ );
VariableRuntimeCache->PendingUpdateOffset =
- (UINT32) MIN ((UINTN) VariableRuntimeCache->PendingUpdateOffset, Offset);
+ (UINT32)MIN ((UINTN)VariableRuntimeCache->PendingUpdateOffset, Offset);
} else {
- VariableRuntimeCache->PendingUpdateLength = (UINT32) Length;
- VariableRuntimeCache->PendingUpdateOffset = (UINT32) Offset;
+ VariableRuntimeCache->PendingUpdateLength = (UINT32)Length;
+ VariableRuntimeCache->PendingUpdateOffset = (UINT32)Offset;
}
+
*(mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.PendingUpdate) = TRUE;
if (*(mVariableModuleGlobal->VariableGlobal.VariableRuntimeCacheContext.ReadLock) == FALSE) {
|