Skip to content

Commit 8f3f010

Browse files
committed
cpuidle: governors: teo: Use s64 consistently in teo_update()
Two local variables in teo_update() are defined as u64, but their values are then compared with s64 values, so it is more consistent to use s64 as their data type. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Christian Loehle <christian.loehle@arm.com> Tested-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/3026616.e9J7NaK4W3@rafael.j.wysocki
1 parent 17673f6 commit 8f3f010

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • drivers/cpuidle/governors

drivers/cpuidle/governors/teo.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
157157
{
158158
struct teo_cpu *cpu_data = this_cpu_ptr(&teo_cpus);
159159
int i, idx_timer = 0, idx_duration = 0;
160-
s64 target_residency_ns;
161-
u64 measured_ns;
160+
s64 target_residency_ns, measured_ns;
162161

163162
cpu_data->short_idles -= cpu_data->short_idles >> DECAY_SHIFT;
164163

@@ -167,9 +166,9 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
167166
* If one of the safety nets has triggered, assume that this
168167
* might have been a long sleep.
169168
*/
170-
measured_ns = U64_MAX;
169+
measured_ns = S64_MAX;
171170
} else {
172-
u64 lat_ns = drv->states[dev->last_state_idx].exit_latency_ns;
171+
s64 lat_ns = drv->states[dev->last_state_idx].exit_latency_ns;
173172

174173
measured_ns = dev->last_residency_ns;
175174
/*

0 commit comments

Comments
 (0)