From 29ca387f6f8e2ee787a8dd73345621d2b6806079 Mon Sep 17 00:00:00 2001 From: Yonattan Louise Date: Fri, 8 May 2015 17:12:52 -0500 Subject: [PATCH] Rename counterLastValue to counter_last_value Updating local variable's name to follow a consistent naming convention. Change accomplished with the following script: #!/bin/bash echo "Searching for ${1} to replace with ${2}" find ./ \( -name "*.[chs]" -o -name "sysgen.py" -o -name "*.kconf" -o -name "*.arch" \) \ ! -path "./host/src/genIdt/*" \ ! -path "*/outdir/*" | xargs sed -i 's/\b'${1}'\b/'${2}'/g'; Change-Id: I92617172c8aafb0f1597d6d9f26d755a68b65252 Signed-off-by: Yonattan Louise --- arch/x86/timer/hpet.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/timer/hpet.c b/arch/x86/timer/hpet.c index 2f4fc103994..ea915290a7c 100644 --- a/arch/x86/timer/hpet.c +++ b/arch/x86/timer/hpet.c @@ -221,7 +221,7 @@ extern int32_t _sys_idle_elapsed_ticks; static uint32_t __noinit counter_load_value; /* main counter units per system tick */ -static uint64_t counterLastValue = +static uint64_t counter_last_value = 0; /* counter value for most recent tick */ static int32_t programmedTicks = 1; /* # ticks timer is programmed for */ @@ -313,9 +313,9 @@ void _timer_int_handler(void *unused) /* configure timer to expire on next tick */ - counterLastValue = *_HPET_TIMER0_COMPARATOR; + counter_last_value = *_HPET_TIMER0_COMPARATOR; *_HPET_TIMER0_CONFIG_CAPS |= HPET_Tn_VAL_SET_CNF; - *_HPET_TIMER0_COMPARATOR = counterLastValue + counter_load_value; + *_HPET_TIMER0_COMPARATOR = counter_last_value + counter_load_value; programmedTicks = 1; /* @@ -392,7 +392,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */ *_HPET_TIMER0_CONFIG_CAPS |= HPET_Tn_VAL_SET_CNF; *_HPET_TIMER0_COMPARATOR = - (ticks >= 0) ? counterLastValue + ticks * counter_load_value + (ticks >= 0) ? counter_last_value + ticks * counter_load_value : ~(uint64_t)0; staleIntCheck = 1; programmedTicks = ticks; @@ -466,15 +466,15 @@ void _timer_idle_exit(void) */ elapsedTicks = - (int32_t)((currTime - counterLastValue) / counter_load_value); - counterLastValue += (uint64_t)elapsedTicks * counter_load_value; + (int32_t)((currTime - counter_last_value) / counter_load_value); + counter_last_value += (uint64_t)elapsedTicks * counter_load_value; - counterNextValue = counterLastValue + counter_load_value; + counterNextValue = counter_last_value + counter_load_value; if ((counterNextValue - currTime) <= HPET_COMP_DELAY) { elapsedTicks++; counterNextValue += counter_load_value; - counterLastValue += counter_load_value; + counter_last_value += counter_load_value; } *_HPET_TIMER0_CONFIG_CAPS |= HPET_Tn_VAL_SET_CNF;