Fix MISRA rule 8.3 in common code
authorRoberto Vargas <roberto.vargas@arm.com>
Mon, 12 Feb 2018 12:36:17 +0000 (12:36 +0000)
committerRoberto Vargas <roberto.vargas@arm.com>
Wed, 28 Feb 2018 17:18:21 +0000 (17:18 +0000)
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 <roberto.vargas@arm.com>
bl31/bl31_context_mgmt.c
drivers/delay_timer/delay_timer.c
include/bl31/bl31.h
include/bl31/interrupt_mgmt.h
include/common/bl_common.h
include/drivers/delay_timer.h
include/lib/pmf/pmf.h
include/plat/common/platform.h
lib/psci/psci_private.h
lib/xlat_tables_v2/xlat_tables_private.h

index 05bf4e171a1e00e3592fa3a42cb90170136e9386..123e623c5177268cb2f79734a1edbdcf2f3fe2fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -99,7 +99,7 @@ void cm_set_context_by_mpidr(uint64_t mpidr, void *context, uint32_t security_st
  * existing cm library routines. This function is expected to be invoked for
  * initializing the cpu_context for the CPU specified by MPIDR for first use.
  ******************************************************************************/
-void cm_init_context(unsigned long mpidr, const entry_point_info_t *ep)
+void cm_init_context(uint64_t mpidr, const entry_point_info_t *ep)
 {
        if ((mpidr & MPIDR_AFFINITY_MASK) ==
                        (read_mpidr_el1() & MPIDR_AFFINITY_MASK))
index c9f84d7773e34924906a852da9bf3945ac7de6ff..587724eb1a50aca7a921020928146e3d31ee1ed3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
  */
@@ -12,7 +12,7 @@
 /***********************************************************
  * The delay timer implementation
  ***********************************************************/
-static const timer_ops_t *ops;
+static const timer_ops_t *timer_ops;
 
 /***********************************************************
  * Delay for the given number of microseconds. The driver must
@@ -20,26 +20,27 @@ static const timer_ops_t *ops;
  ***********************************************************/
 void udelay(uint32_t usec)
 {
-       assert(ops != NULL &&
-               (ops->clk_mult != 0) &&
-               (ops->clk_div != 0) &&
-               (ops->get_timer_value != NULL));
+       assert(timer_ops != NULL &&
+               (timer_ops->clk_mult != 0) &&
+               (timer_ops->clk_div != 0) &&
+               (timer_ops->get_timer_value != NULL));
 
        uint32_t start, delta, total_delta;
 
-       assert(usec < UINT32_MAX / ops->clk_div);
+       assert(usec < UINT32_MAX / timer_ops->clk_div);
 
-       start = ops->get_timer_value();
+       start = timer_ops->get_timer_value();
 
        /* Add an extra tick to avoid delaying less than requested. */
-       total_delta = div_round_up(usec * ops->clk_div, ops->clk_mult) + 1;
+       total_delta =
+               div_round_up(usec * timer_ops->clk_div, timer_ops->clk_mult) + 1;
 
        do {
                /*
                 * If the timer value wraps around, the subtraction will
                 * overflow and it will still give the correct result.
                 */
-               delta = start - ops->get_timer_value(); /* Decreasing counter */
+               delta = start - timer_ops->get_timer_value(); /* Decreasing counter */
 
        } while (delta < total_delta);
 }
@@ -64,5 +65,5 @@ void timer_init(const timer_ops_t *ops_ptr)
                (ops_ptr->clk_div != 0) &&
                (ops_ptr->get_timer_value != NULL));
 
-       ops = ops_ptr;
+       timer_ops = ops_ptr;
 }
index b3567e2e34efe57aca9ce992172226e2b5beb600..aac6e2893bbb941bef724a394a78700983937da1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
  * Function prototypes
  ******************************************************************************/
 void bl31_next_el_arch_setup(uint32_t security_state);
-void bl31_set_next_image_type(uint32_t type);
+void bl31_set_next_image_type(uint32_t security_state);
 uint32_t bl31_get_next_image_type(void);
 void bl31_prepare_next_image_entry(void);
-void bl31_register_bl32_init(int32_t (*)(void));
+void bl31_register_bl32_init(int32_t (*func)(void));
 void bl31_warm_entrypoint(void);
 
 #endif /* __BL31_H__ */
index d41edd0991fcc8a0eac4ebfae82a312a982098a4..905dcd66915a2a94e9b89b6cf2d7acada16d25b9 100644 (file)
@@ -124,7 +124,7 @@ int32_t set_routing_model(uint32_t type, uint32_t flags);
 int32_t register_interrupt_type_handler(uint32_t type,
                                        interrupt_type_handler_t handler,
                                        uint32_t flags);
-interrupt_type_handler_t get_interrupt_type_handler(uint32_t interrupt_type);
+interrupt_type_handler_t get_interrupt_type_handler(uint32_t type);
 int disable_intr_rm_local(uint32_t type, uint32_t security_state);
 int enable_intr_rm_local(uint32_t type, uint32_t security_state);
 
index 6a249f5b24a935206ec5b9ff8d614690b5b3b392..65718301babcd0d10dba9f30eb5942b66cb6434e 100644 (file)
@@ -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
  */
@@ -210,7 +210,7 @@ int load_auth_image(unsigned int image_id, image_info_t *image_data);
 
 #else
 
-uintptr_t page_align(uintptr_t, unsigned);
+uintptr_t page_align(uintptr_t value, unsigned dir);
 int load_image(meminfo_t *mem_layout,
               unsigned int image_id,
               uintptr_t image_base,
index 4e44a5ee1065da46910684a1f671a28d6a279e91..b28f619b1a0b01b5848669c9dbc316e53f35bee9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
  */
@@ -25,7 +25,7 @@ typedef struct timer_ops {
 
 void mdelay(uint32_t msec);
 void udelay(uint32_t usec);
-void timer_init(const timer_ops_t *ops);
+void timer_init(const timer_ops_t *ops_ptr);
 
 
 #endif /* __DELAY_TIMER_H__ */
index cdff76350874224ba358bc97fda75c83152b2365..a3d32263da4837613994ef7b189ffbebe497127c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
 int pmf_get_timestamp_smc(unsigned int tid,
                u_register_t mpidr,
                unsigned int flags,
-               unsigned long long *ts);
+               unsigned long long *ts_value);
 int pmf_setup(void);
 uintptr_t pmf_smc_handler(unsigned int smc_fid,
                u_register_t x1,
index 411202daf2b23ca6823cf2541ff3a73a7dfd88b2..e614cdb996016d2fc9155cfda46cb38398242034 100644 (file)
@@ -301,7 +301,7 @@ struct entry_point_info *bl31_plat_get_next_image_ep_info(uint32_t type);
  * Mandatory PSCI functions (BL31)
  ******************************************************************************/
 int plat_setup_psci_ops(uintptr_t sec_entrypoint,
-                       const struct plat_psci_ops **);
+                       const struct plat_psci_ops **psci_ops);
 const unsigned char *plat_get_power_domain_tree_desc(void);
 
 /*******************************************************************************
@@ -311,7 +311,7 @@ void plat_psci_stat_accounting_start(const psci_power_state_t *state_info);
 void plat_psci_stat_accounting_stop(const psci_power_state_t *state_info);
 u_register_t plat_psci_stat_get_residency(unsigned int lvl,
                        const psci_power_state_t *state_info,
-                       int last_cpu_index);
+                       int last_cpu_idx);
 plat_local_state_t plat_get_target_pwr_state(unsigned int lvl,
                        const plat_local_state_t *states,
                        unsigned int ncpu);
index 504fb9e4ff1c49645fb3f3037ea5d279f238e51f..c58f32969aefd910cadf3916a8faf819d9c63a41 100644 (file)
@@ -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);
index 79efbebba9b75d7e095e27157b67cac941da740e..07963b187cd73b75682be10944587503fc7673d3 100644 (file)
@@ -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