cpuidle: teo: Avoid code duplication in conditionals
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 13 Nov 2019 00:10:13 +0000 (01:10 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 14 Nov 2019 23:54:33 +0000 (00:54 +0100)
commit85f6a17f24f9f7faa4aaecf98e12acdd312aa4c9
tree7cb34ee94de71a1536af0f3f12d05e7dfbd67430
parent63f202e5edf161c2ccffa286a9a701e995427b15
cpuidle: teo: Avoid code duplication in conditionals

There are three places in teo_select() where a given amount of time
is compared with TICK_NSEC if tick_nohz_tick_stopped() returns true,
which is a bit of duplicated code.

Avoid that code duplication by defining a helper function to do the
check and using it in all of the places in question.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/teo.c