From d6b04be694fe15dec8e329ca0a2876d1f1f9fe67 Mon Sep 17 00:00:00 2001 From: Yonattan Louise Date: Fri, 8 May 2015 17:12:54 -0500 Subject: [PATCH] Rename _MaxSysTicks to max_system_ticks Updating local variable's name to follow a consistent naming convention. The prefix underscore is removed due to it's a local variable. 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: Ic28658f68d473b3a163fe5d97f611bfd572f140e Signed-off-by: Yonattan Louise --- arch/x86/timer/loApicTimer.c | 10 +++++----- drivers/timer/i8253.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/x86/timer/loApicTimer.c b/arch/x86/timer/loApicTimer.c index c8479d097d1..1d820c8ce67 100644 --- a/arch/x86/timer/loApicTimer.c +++ b/arch/x86/timer/loApicTimer.c @@ -134,7 +134,7 @@ static uint32_t clock_accumulated_count = 0; #if defined(TIMER_SUPPORTS_TICKLESS) static uint32_t idle_original_count = 0; -static uint32_t __noinit _MaxSysTicks; +static uint32_t __noinit max_system_ticks; static uint32_t _IdleOrigTicks = 0; static uint32_t __noinit _MaxLoadValue; static uint32_t __noinit _TimerIdleSkew; @@ -396,9 +396,9 @@ void _timer_int_handler(void *unused /* parameter is not used */ static void _loApicTimerTicklessIdleInit(void) { - _MaxSysTicks = 0xffffffff / counterLoadVal; + max_system_ticks = 0xffffffff / counterLoadVal; /* this gives a count that gives the max number of full ticks */ - _MaxLoadValue = _MaxSysTicks * counterLoadVal; + _MaxLoadValue = max_system_ticks * counterLoadVal; } /******************************************************************************* @@ -459,7 +459,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */ */ idle_original_count = _loApicTimerGetRemaining() - _TimerIdleSkew; - if ((ticks == -1) || (ticks > _MaxSysTicks)) { + if ((ticks == -1) || (ticks > max_system_ticks)) { /* * We've been asked to fire the timer so far in the future that * the @@ -472,7 +472,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */ * is added. */ idle_original_count += _MaxLoadValue - counterLoadVal; - _IdleOrigTicks = _MaxSysTicks - 1; + _IdleOrigTicks = max_system_ticks - 1; } else { /* leave one tick of buffer to have to time react when coming * back ? */ diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c index 46c81f03364..e8d7c3a6a09 100644 --- a/drivers/timer/i8253.c +++ b/drivers/timer/i8253.c @@ -140,7 +140,7 @@ static uint16_t _currentLoadVal = 0; static uint16_t idle_original_count = 0; static uint16_t _IdleOrigTicks = 0; -static uint16_t __noinit _MaxSysTicks; +static uint16_t __noinit max_system_ticks; static uint16_t __noinit _MaxLoadValue; static uint16_t __noinit _TimerIdleSkew; @@ -350,9 +350,9 @@ void _timer_int_handler(void *unusedArg /* not used */ static void _i8253TicklessIdleInit(void) { - _MaxSysTicks = 0xffff / counterLoadVal; + max_system_ticks = 0xffff / counterLoadVal; /* this gives a count that gives the max number of full ticks */ - _MaxLoadValue = _MaxSysTicks * counterLoadVal; + _MaxLoadValue = max_system_ticks * counterLoadVal; } /******************************************************************************* @@ -393,7 +393,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */ */ newCount = _i8253CounterRead(); - if (ticks == -1 || ticks > _MaxSysTicks) { + if (ticks == -1 || ticks > max_system_ticks) { /* * We've been asked to fire the timer so far in the future that * the @@ -406,7 +406,7 @@ void _timer_idle_enter(int32_t ticks /* system ticks */ * is added. */ newCount += _MaxLoadValue - counterLoadVal; - _IdleOrigTicks = _MaxSysTicks - 1; + _IdleOrigTicks = max_system_ticks - 1; } else { /* leave one tick of buffer to have to time react when coming * back ? */