diff options
author | Daniel Boulby <daniel.boulby@arm.com> | 2018-05-03 10:59:09 +0100 |
---|---|---|
committer | Daniel Boulby <daniel.boulby@arm.com> | 2018-06-12 13:21:36 +0100 |
commit | 40692923882928ce52b61bfae1e5507b0076f105 (patch) | |
tree | a07150eaff4baa896139f0a7c5e2add4654dab4f /lib | |
parent | ff4e86f90e885ccfca1b51a88c23b47130af9292 (diff) | |
download | platform_external_arm-trusted-firmware-40692923882928ce52b61bfae1e5507b0076f105.tar.gz platform_external_arm-trusted-firmware-40692923882928ce52b61bfae1e5507b0076f105.tar.bz2 platform_external_arm-trusted-firmware-40692923882928ce52b61bfae1e5507b0076f105.zip |
Fix MISRA Rule 5.7 Part 1
Rule 5.7: A tag name shall be a unique identifier
There were 2 amu_ctx struct type definitions:
- In lib/extensions/amu/aarch64/amu.c
- In lib/cpus/aarch64/cpuamu.c
Renamed the latter to cpuamu_ctx to avoid this name clash
To avoid violation of Rule 8.3 also change name of function
amu_ctxs to unique name (cpuamu_ctxs) since it now returns a
different type (cpuamu_ctx) than the other amu_ctxs function
Fixed for:
make LOG_LEVEL=50 PLAT=fvp
Change-Id: Ieeb7e390ec2900fd8b775bef312eda93804a43ed
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cpus/aarch64/cpuamu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/cpus/aarch64/cpuamu.c b/lib/cpus/aarch64/cpuamu.c index b9bad8604..5ad5bf839 100644 --- a/lib/cpus/aarch64/cpuamu.c +++ b/lib/cpus/aarch64/cpuamu.c @@ -10,12 +10,12 @@ #define CPUAMU_NR_COUNTERS 5U -struct amu_ctx { +struct cpuamu_ctx { uint64_t cnts[CPUAMU_NR_COUNTERS]; unsigned int mask; }; -static struct amu_ctx amu_ctxs[PLATFORM_CORE_COUNT]; +static struct cpuamu_ctx cpuamu_ctxs[PLATFORM_CORE_COUNT]; int midr_match(unsigned int cpu_midr) { @@ -29,7 +29,7 @@ int midr_match(unsigned int cpu_midr) void cpuamu_context_save(unsigned int nr_counters) { - struct amu_ctx *ctx = &amu_ctxs[plat_my_core_pos()]; + struct cpuamu_ctx *ctx = &cpuamu_ctxs[plat_my_core_pos()]; unsigned int i; assert(nr_counters <= CPUAMU_NR_COUNTERS); @@ -48,7 +48,7 @@ void cpuamu_context_save(unsigned int nr_counters) void cpuamu_context_restore(unsigned int nr_counters) { - struct amu_ctx *ctx = &amu_ctxs[plat_my_core_pos()]; + struct cpuamu_ctx *ctx = &cpuamu_ctxs[plat_my_core_pos()]; unsigned int i; assert(nr_counters <= CPUAMU_NR_COUNTERS); |