From 9fb8af33c40f21becde99fc15db73b1f4d82059c Mon Sep 17 00:00:00 2001 From: Roberto Vargas Date: Mon, 12 Feb 2018 12:36:17 +0000 Subject: Fix MISRA rule 8.3 in common code Rule 8.3: All declarations of an object or function shall use the same names and type qualifiers. Change-Id: Iff384187c74a598a4e73f350a1893b60e9d16cec Signed-off-by: Roberto Vargas --- lib/psci/psci_private.h | 6 +++--- lib/xlat_tables_v2/xlat_tables_private.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/psci/psci_private.h b/lib/psci/psci_private.h index 504fb9e4..c58f3296 100644 --- a/lib/psci/psci_private.h +++ b/lib/psci/psci_private.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -218,7 +218,7 @@ void psci_acquire_pwr_domain_locks(unsigned int end_pwrlvl, void psci_release_pwr_domain_locks(unsigned int end_pwrlvl, unsigned int cpu_idx); int psci_validate_suspend_req(const psci_power_state_t *state_info, - unsigned int is_power_down_state_req); + unsigned int is_power_down_state); unsigned int psci_find_max_off_lvl(const psci_power_state_t *state_info); unsigned int psci_find_target_suspend_lvl(const psci_power_state_t *state_info); void psci_set_pwr_domains_to_run(unsigned int end_pwrlvl); @@ -248,7 +248,7 @@ int psci_do_cpu_off(unsigned int end_pwrlvl); void psci_cpu_suspend_start(entry_point_info_t *ep, unsigned int end_pwrlvl, psci_power_state_t *state_info, - unsigned int is_power_down_state_req); + unsigned int is_power_down_state); void psci_cpu_suspend_finish(unsigned int cpu_idx, psci_power_state_t *state_info); diff --git a/lib/xlat_tables_v2/xlat_tables_private.h b/lib/xlat_tables_v2/xlat_tables_private.h index 79efbebb..07963b18 100644 --- a/lib/xlat_tables_v2/xlat_tables_private.h +++ b/lib/xlat_tables_v2/xlat_tables_private.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -83,7 +83,7 @@ unsigned long long xlat_arch_get_max_supported_pa(void); /* Enable MMU and configure it to use the specified translation tables. */ void enable_mmu_arch(unsigned int flags, uint64_t *base_table, - unsigned long long pa, uintptr_t max_va); + unsigned long long max_pa, uintptr_t max_va); /* * Return 1 if the MMU of the translation regime managed by the given xlat_ctx_t -- cgit v1.2.3 From 7fabe1a89903cab4919304faa085ee6eaaec5c9d Mon Sep 17 00:00:00 2001 From: Roberto Vargas Date: Mon, 12 Feb 2018 12:36:17 +0000 Subject: Fix MISRA rule 8.4 in common code Rule 8.4: A compatible declaration shall be visible when an object or function with external linkage is defined. Change-Id: I26e042cb251a6f9590afa1340fdac73e42f23979 Signed-off-by: Roberto Vargas --- lib/extensions/spe/spe.c | 3 ++- lib/stdlib/abort.c | 3 ++- lib/stdlib/exit.c | 3 ++- lib/stdlib/sscanf.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/extensions/spe/spe.c b/lib/extensions/spe/spe.c index 3b297f21..a1ed7b70 100644 --- a/lib/extensions/spe/spe.c +++ b/lib/extensions/spe/spe.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,6 +7,7 @@ #include #include #include +#include /* * The assembler does not yet understand the psb csync mnemonic diff --git a/lib/stdlib/abort.c b/lib/stdlib/abort.c index af19ccfa..65ce4cca 100644 --- a/lib/stdlib/abort.c +++ b/lib/stdlib/abort.c @@ -1,10 +1,11 @@ /* - * Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include +#include /* * This is a basic implementation. This could be improved. diff --git a/lib/stdlib/exit.c b/lib/stdlib/exit.c index 3d23d7be..afc3f934 100644 --- a/lib/stdlib/exit.c +++ b/lib/stdlib/exit.c @@ -1,10 +1,11 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include +#include void exit(int v) { diff --git a/lib/stdlib/sscanf.c b/lib/stdlib/sscanf.c index 674ae79f..a5876cff 100644 --- a/lib/stdlib/sscanf.c +++ b/lib/stdlib/sscanf.c @@ -1,9 +1,10 @@ /* - * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ +#include #include /* -- cgit v1.2.3 From 1af540ef2a09797c3a22c40c340facd4b2f47c2f Mon Sep 17 00:00:00 2001 From: Roberto Vargas Date: Mon, 12 Feb 2018 12:36:17 +0000 Subject: Fix MISRA rule 8.4 Part 1 Rule 8.4: A compatible declaration shall be visible when an object or function with external linkage is defined Fixed for: make DEBUG=1 PLAT=fvp LOG_LEVEL=50 all Change-Id: I7c2ad3f5c015411c202605851240d5347e4cc8c7 Signed-off-by: Roberto Vargas --- lib/xlat_tables_v2/xlat_tables_internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/xlat_tables_v2/xlat_tables_internal.c b/lib/xlat_tables_v2/xlat_tables_internal.c index 75c5a912..653260ce 100644 --- a/lib/xlat_tables_v2/xlat_tables_internal.c +++ b/lib/xlat_tables_v2/xlat_tables_internal.c @@ -115,7 +115,7 @@ static uint64_t *xlat_table_get_empty(xlat_ctx_t *ctx) /* * Returns a block/page table descriptor for the given level and attributes. */ -uint64_t xlat_desc(const xlat_ctx_t *ctx, mmap_attr_t attr, +static uint64_t xlat_desc(const xlat_ctx_t *ctx, mmap_attr_t attr, unsigned long long addr_pa, int level) { uint64_t desc; -- cgit v1.2.3