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/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;