mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
ANDROID: cpufreq: times: fix proc_time_in_state_show
Read times from p->time_in_state. Remove the "times" pointer, which is never initialized. Bug: 75238970 Test: /proc/<pid>/time_in_state now shows some nonzero values Change-Id: I2f375b64ec39de034da3e24e5e5fb58b04958b76 Signed-off-by: Connor O'Brien <connoro@google.com>
This commit is contained in:
committed by
Amit Pundir
parent
8a9538c297
commit
9bf5cde85e
@@ -289,7 +289,6 @@ int proc_time_in_state_show(struct seq_file *m, struct pid_namespace *ns,
|
||||
unsigned int cpu, i;
|
||||
cputime_t cputime;
|
||||
unsigned long flags;
|
||||
u64 *times;
|
||||
struct cpu_freqs *freqs;
|
||||
struct cpu_freqs *last_freqs = NULL;
|
||||
|
||||
@@ -307,7 +306,7 @@ int proc_time_in_state_show(struct seq_file *m, struct pid_namespace *ns,
|
||||
cputime = 0;
|
||||
if (freqs->offset + i < p->max_state &&
|
||||
p->time_in_state)
|
||||
cputime = times[freqs->offset + i];
|
||||
cputime = p->time_in_state[freqs->offset + i];
|
||||
seq_printf(m, "%u %lu\n", freqs->freq_table[i],
|
||||
(unsigned long)cputime_to_clock_t(cputime));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user