Skip to content
Commit 5bb1729c authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

cpuidle: menu: Avoid pointless checks in menu_select()



If menu_select() cannot find a suitable state to return, it will
return the state index stored in data->last_state_idx.  This
means that it is pointless to look at the states whose indices
are less than or equal to data->last_state_idx in the main loop,
so don't do that.

Given that those checks are done on every idle state selection, this
change can save quite a bit of completely unnecessary overhead.

Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Tested-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 51164251
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment