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>
/** @file\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
/** @file\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2011 - 2021, ARM Ltd. All rights reserved.<BR>\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
- UINT32 val = ArmReadAuxCr();\r
- val |= Bits;\r
- ArmWriteAuxCr(val);\r
+ ArmWriteAuxCr(ArmReadAuxCr() | Bits);\r
- UINT32 val = ArmReadAuxCr();\r
- val &= ~Bits;\r
- ArmWriteAuxCr(val);\r
+ ArmWriteAuxCr(ArmReadAuxCr() & ~Bits);\r
- UINTN Value;\r
- Value = ArmReadCpuActlr ();\r
- Value |= Bits;\r
- ArmWriteCpuActlr (Value);\r
+ ArmWriteCpuActlr (ArmReadCpuActlr () | Bits);\r
- UINTN Value;\r
- Value = ArmReadCpuActlr ();\r
- Value &= ~Bits;\r
- ArmWriteCpuActlr (Value);\r
+ ArmWriteCpuActlr (ArmReadCpuActlr () & ~Bits);\r