cpufreq: stats: Mark few conditionals with unlikely()
[sfrench/cifs-2.6.git] / drivers / cpufreq / cpufreq_stats.c
index 45a0678553677188f15728c9be45d877ca819156..bba04da3a2780134bd679a7de4bd07039f0096c9 100644 (file)
@@ -260,7 +260,7 @@ void cpufreq_stats_record_transition(struct cpufreq_policy *policy,
        struct cpufreq_stats *stats = policy->stats;
        int old_index, new_index;
 
-       if (!stats)
+       if (unlikely(!stats))
                return;
 
        if (unlikely(READ_ONCE(stats->reset_pending)))
@@ -270,7 +270,7 @@ void cpufreq_stats_record_transition(struct cpufreq_policy *policy,
        new_index = freq_table_get_index(stats, new_freq);
 
        /* We can't do stats->time_in_state[-1]= .. */
-       if (old_index == -1 || new_index == -1 || old_index == new_index)
+       if (unlikely(old_index == -1 || new_index == -1 || old_index == new_index))
                return;
 
        cpufreq_stats_update(stats, stats->last_time);