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 <roberto.vargas@arm.com>
diff --git a/drivers/delay_timer/delay_timer.c b/drivers/delay_timer/delay_timer.c
index c9f84d7..587724e 100644
--- a/drivers/delay_timer/delay_timer.c
+++ b/drivers/delay_timer/delay_timer.c
@@ -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 @@
***********************************************************/
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 @@
(ops_ptr->clk_div != 0) &&
(ops_ptr->get_timer_value != NULL));
- ops = ops_ptr;
+ timer_ops = ops_ptr;
}