sched: micro optimization for sched_energy_present

sched_energy_present is always present for chipsets that are supported,
so, switch to static_branch_likely() to let compiler know the same for
better optimization.

Change-Id: Ie4615ae6f7d1ec7498d0708f500c5a5a72ef4b4d
Signed-off-by: Satya Durga Srinivasu Prabhala <[email protected]>
This commit is contained in:
Satya Durga Srinivasu Prabhala 2020-02-03 17:43:55 -08:00
commit 510535838b

View file

@ -2830,7 +2830,7 @@ DECLARE_STATIC_KEY_FALSE(sched_energy_present);
static inline bool sched_energy_enabled(void)
{
return static_branch_unlikely(&sched_energy_present);
return static_branch_likely(&sched_energy_present);
}
#else /* ! (CONFIG_ENERGY_MODEL && CONFIG_CPU_FREQ_GOV_SCHEDUTIL) */