Rename _IdleOrigCount to idle_original_count
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: I31e267c1479dfaeeb0fba8c6ba0da45a3c011c0f
Signed-off-by: Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
diff --git a/arch/x86/timer/loApicTimer.c b/arch/x86/timer/loApicTimer.c
index 6ed67ff..c8479d0 100644
--- a/arch/x86/timer/loApicTimer.c
+++ b/arch/x86/timer/loApicTimer.c
@@ -133,7 +133,7 @@
static uint32_t clock_accumulated_count = 0;
#if defined(TIMER_SUPPORTS_TICKLESS)
-static uint32_t _IdleOrigCount = 0;
+static uint32_t idle_original_count = 0;
static uint32_t __noinit _MaxSysTicks;
static uint32_t _IdleOrigTicks = 0;
static uint32_t __noinit _MaxLoadValue;
@@ -457,7 +457,7 @@
* timer. So we read the count out of it and add it to the requested
* time out
*/
- _IdleOrigCount = _loApicTimerGetRemaining() - _TimerIdleSkew;
+ idle_original_count = _loApicTimerGetRemaining() - _TimerIdleSkew;
if ((ticks == -1) || (ticks > _MaxSysTicks)) {
/*
@@ -471,20 +471,20 @@
* earlier
* is added.
*/
- _IdleOrigCount += _MaxLoadValue - counterLoadVal;
+ idle_original_count += _MaxLoadValue - counterLoadVal;
_IdleOrigTicks = _MaxSysTicks - 1;
} else {
/* leave one tick of buffer to have to time react when coming
* back ? */
_IdleOrigTicks = ticks - 1;
- _IdleOrigCount += _IdleOrigTicks * counterLoadVal;
+ idle_original_count += _IdleOrigTicks * counterLoadVal;
}
_TimerMode = TIMER_MODE_PERIODIC_ENT;
/* Set timer to one shot mode */
_loApicTimerOneShot();
- _loApicTimerSetCount(_IdleOrigCount);
+ _loApicTimerSetCount(idle_original_count);
_loApicTimerStart();
}
@@ -514,7 +514,7 @@
count = _loApicTimerGetRemaining();
- if ((count == 0) || (count >= _IdleOrigCount)) {
+ if ((count == 0) || (count >= idle_original_count)) {
/* Timer expired and/or wrapped around. Place back in periodic
* mode */
_loApicTimerPeriodic();
@@ -533,7 +533,7 @@
uint32_t elapsed; /* elapsed "counter time" */
uint32_t remaining; /* remaining "counter time" */
- elapsed = _IdleOrigCount - count;
+ elapsed = idle_original_count - count;
remaining = elapsed % counterLoadVal;
diff --git a/drivers/timer/i8253.c b/drivers/timer/i8253.c
index 008be30..46c81f0 100644
--- a/drivers/timer/i8253.c
+++ b/drivers/timer/i8253.c
@@ -138,7 +138,7 @@
#if defined(TIMER_SUPPORTS_TICKLESS)
-static uint16_t _IdleOrigCount = 0;
+static uint16_t idle_original_count = 0;
static uint16_t _IdleOrigTicks = 0;
static uint16_t __noinit _MaxSysTicks;
static uint16_t __noinit _MaxLoadValue;
@@ -414,7 +414,7 @@
newCount += _IdleOrigTicks * counterLoadVal;
}
- _IdleOrigCount = newCount - _TimerIdleSkew;
+ idle_original_count = newCount - _TimerIdleSkew;
/* Stop/start the timer instead of disabling/enabling the interrupt? */
irq_disable(PIT_INT_LVL);
@@ -452,7 +452,7 @@
/* request counter 0 to be latched */
count = _i8253CounterRead();
- if ((count == 0) || (count >= _IdleOrigCount)) {
+ if ((count == 0) || (count >= idle_original_count)) {
/* Timer expired. Place back in periodic mode */
_i8253CounterPeriodic(counterLoadVal);
_TimerMode = TIMER_MODE_PERIODIC;
@@ -469,7 +469,7 @@
uint16_t elapsed; /* elapsed "counter time" */
uint16_t remaining; /* remaing "counter time" */
- elapsed = _IdleOrigCount - count;
+ elapsed = idle_original_count - count;
remaining = elapsed % counterLoadVal;