]> git.baikalelectronics.ru Git - kernel.git/commit
cpuidle: Use s64 as exit_latency_ns and target_residency_ns data type
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Mar 2021 18:15:19 +0000 (20:15 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Apr 2021 17:26:44 +0000 (19:26 +0200)
commitc25eb69bad0a1429b5ac7715b7fa2bf451bfee4e
tree48fec8d2b32f9776a172b9a4e245ba44651b798a
parentfe4d892367c4e966da48e931070512bd476261b3
cpuidle: Use s64 as exit_latency_ns and target_residency_ns data type

Subsequent changes will cause the exit_latency_ns and target_residency_ns
fields in struct cpuidle_state to be used in computations in which data
type conversions to u64 may turn a negative number close to zero into
a verly large positive number leading to incorrect results.

In preparation for that, change the data type of the fields mentioned
above to s64, but ensure that they will not be negative themselves.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/driver.c
include/linux/cpuidle.h