diff options
author | Pierre Gondois <Pierre.Gondois@arm.com> | 2020-12-10 13:12:00 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-01-06 16:22:54 +0000 |
commit | 178dbd4442827d179e5800a19d60c3f5c03583ab (patch) | |
tree | ddb8b0c001591af5558ae0c886cdcca3f7962db1 /ArmPkg/Library/ArmLib/ArmLib.c | |
parent | b9b86dc4f60a0010b4a3f12b97f8357269b6bfa2 (diff) | |
download | edk2-178dbd4442827d179e5800a19d60c3f5c03583ab.zip edk2-178dbd4442827d179e5800a19d60c3f5c03583ab.tar.gz edk2-178dbd4442827d179e5800a19d60c3f5c03583ab.tar.bz2 |
ArmPkg: Fix Ecc error 5007 in ArmLib
This patch fixes the following Ecc reported error:
There should be no initialization of a variable as
part of its declaration
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Diffstat (limited to 'ArmPkg/Library/ArmLib/ArmLib.c')
-rw-r--r-- | ArmPkg/Library/ArmLib/ArmLib.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/ArmPkg/Library/ArmLib/ArmLib.c b/ArmPkg/Library/ArmLib/ArmLib.c index 3905d02..c8622f1 100644 --- a/ArmPkg/Library/ArmLib/ArmLib.c +++ b/ArmPkg/Library/ArmLib/ArmLib.c @@ -1,7 +1,7 @@ /** @file
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
- Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
+ Copyright (c) 2011 - 2021, ARM Ltd. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -19,9 +19,7 @@ ArmSetAuxCrBit ( IN UINT32 Bits
)
{
- UINT32 val = ArmReadAuxCr();
- val |= Bits;
- ArmWriteAuxCr(val);
+ ArmWriteAuxCr(ArmReadAuxCr() | Bits);
}
VOID
@@ -30,9 +28,7 @@ ArmUnsetAuxCrBit ( IN UINT32 Bits
)
{
- UINT32 val = ArmReadAuxCr();
- val &= ~Bits;
- ArmWriteAuxCr(val);
+ ArmWriteAuxCr(ArmReadAuxCr() & ~Bits);
}
//
@@ -45,10 +41,7 @@ ArmSetCpuActlrBit ( IN UINTN Bits
)
{
- UINTN Value;
- Value = ArmReadCpuActlr ();
- Value |= Bits;
- ArmWriteCpuActlr (Value);
+ ArmWriteCpuActlr (ArmReadCpuActlr () | Bits);
}
VOID
@@ -57,10 +50,7 @@ ArmUnsetCpuActlrBit ( IN UINTN Bits
)
{
- UINTN Value;
- Value = ArmReadCpuActlr ();
- Value &= ~Bits;
- ArmWriteCpuActlr (Value);
+ ArmWriteCpuActlr (ArmReadCpuActlr () & ~Bits);
}
UINTN
|