diff options
author | Daniel Boulby <daniel.boulby@arm.com> | 2018-05-04 14:04:07 +0100 |
---|---|---|
committer | Daniel Boulby <daniel.boulby@arm.com> | 2018-06-12 13:21:36 +0100 |
commit | 896a5902ecd9f8ffd1ad7cfd75ea646351c79fc1 (patch) | |
tree | e1f93b3a46470ea85d66e072c7c02353e4357d6d /drivers | |
parent | d3775d46a43a47c521193229cfcb1c0d6cb4878b (diff) |
Fix MISRA Rule 5.3 Part 2
Use a _ prefix for Macro arguments to prevent that argument from
hiding variables of the same name in the outer scope
Rule 5.3: An identifier declared in an inner scope shall not
hide an identifier declared in an outer scope
Fixed For:
make LOG_LEVEL=50 PLAT=fvp
Change-Id: I67b6b05cbad4aeca65ce52981b4679b340604708
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/arm/gic/v3/gicv3_private.h | 14 | ||||
-rw-r--r-- | drivers/arm/smmu/smmu_v3.c | 4 | ||||
-rw-r--r-- | drivers/arm/tzc/tzc400.c | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/arm/gic/v3/gicv3_private.h b/drivers/arm/gic/v3/gicv3_private.h index db485d24..e1c0775f 100644 --- a/drivers/arm/gic/v3/gicv3_private.h +++ b/drivers/arm/gic/v3/gicv3_private.h @@ -27,20 +27,20 @@ * GICD_IROUTER. Bits[31:24] in the MPIDR are cleared as they are not relevant * to GICv3. */ -#define gicd_irouter_val_from_mpidr(mpidr, irm) \ - ((mpidr & ~(0xff << 24)) | \ - (irm & IROUTER_IRM_MASK) << IROUTER_IRM_SHIFT) +#define gicd_irouter_val_from_mpidr(_mpidr, _irm) \ + ((_mpidr & ~(0xff << 24)) | \ + (_irm & IROUTER_IRM_MASK) << IROUTER_IRM_SHIFT) /* * Macro to convert a GICR_TYPER affinity value into a MPIDR value. Bits[31:24] * are zeroes. */ #ifdef AARCH32 -#define mpidr_from_gicr_typer(typer_val) (((typer_val) >> 32) & 0xffffff) +#define mpidr_from_gicr_typer(_typer_val) (((_typer_val) >> 32) & 0xffffff) #else -#define mpidr_from_gicr_typer(typer_val) \ - (((((typer_val) >> 56) & MPIDR_AFFLVL_MASK) << MPIDR_AFF3_SHIFT) | \ - (((typer_val) >> 32) & 0xffffff)) +#define mpidr_from_gicr_typer(_typer_val) \ + (((((_typer_val) >> 56) & MPIDR_AFFLVL_MASK) << MPIDR_AFF3_SHIFT) | \ + (((_typer_val) >> 32) & 0xffffff)) #endif /******************************************************************************* diff --git a/drivers/arm/smmu/smmu_v3.c b/drivers/arm/smmu/smmu_v3.c index cfe8c2a4..7b017e30 100644 --- a/drivers/arm/smmu/smmu_v3.c +++ b/drivers/arm/smmu/smmu_v3.c @@ -8,8 +8,8 @@ #include <smmu_v3.h> /* Test for pending invalidate */ -#define INVAL_PENDING(base) \ - smmuv3_read_s_init(base) & SMMU_S_INIT_INV_ALL_MASK +#define INVAL_PENDING(_base) \ + smmuv3_read_s_init(_base) & SMMU_S_INIT_INV_ALL_MASK static inline uint32_t smmuv3_read_s_idr1(uintptr_t base) { diff --git a/drivers/arm/tzc/tzc400.c b/drivers/arm/tzc/tzc400.c index 0999fa54..db4f88a9 100644 --- a/drivers/arm/tzc/tzc400.c +++ b/drivers/arm/tzc/tzc400.c @@ -54,7 +54,7 @@ static inline void _tzc400_write_gate_keeper(uintptr_t base, unsigned int val) /* * Get the open status information for all filter units. */ -#define get_gate_keeper_os(base) ((_tzc400_read_gate_keeper(base) >> \ +#define get_gate_keeper_os(_base) ((_tzc400_read_gate_keeper(_base) >> \ GATE_KEEPER_OS_SHIFT) & \ GATE_KEEPER_OS_MASK) |