* [ammarfaizi2-block:google/android/kernel/common/android-4.9-q-release 2199/9999] drivers/cpufreq/cpufreq_times.c:117:35: sparse: sparse: implicit cast to nocast type
@ 2022-08-21 4:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-21 4:27 UTC (permalink / raw)
To: Ammar Faizi, GNU/Weeb Mailing List; +Cc: kbuild-all
tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android-4.9-q-release
head: 8c62b2bd034cfb52860b9e3f333b1ef587052af2
commit: 6e7b83d80b5f81f41f3df9b3660acdf88532c879 [2199/9999] ANDROID: cpufreq: track per-task time in state
config: i386-randconfig-s003 (https://download.01.org/0day-ci/archive/20220821/[email protected]/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://github.com/ammarfaizi2/linux-block/commit/6e7b83d80b5f81f41f3df9b3660acdf88532c879
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android-4.9-q-release
git checkout 6e7b83d80b5f81f41f3df9b3660acdf88532c879
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/cpufreq/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
sparse warnings: (new ones prefixed by >>)
>> drivers/cpufreq/cpufreq_times.c:117:35: sparse: sparse: implicit cast to nocast type
drivers/cpufreq/cpufreq_times.c:120:59: sparse: sparse: implicit cast to nocast type
vim +117 drivers/cpufreq/cpufreq_times.c
96
97 int proc_time_in_state_show(struct seq_file *m, struct pid_namespace *ns,
98 struct pid *pid, struct task_struct *p)
99 {
100 unsigned int cpu, i;
101 cputime_t cputime;
102 unsigned long flags;
103 struct cpu_freqs *freqs;
104 struct cpu_freqs *last_freqs = NULL;
105
106 spin_lock_irqsave(&task_time_in_state_lock, flags);
107 for_each_possible_cpu(cpu) {
108 freqs = all_freqs[cpu];
109 if (!freqs || freqs == last_freqs)
110 continue;
111 last_freqs = freqs;
112
113 seq_printf(m, "cpu%u\n", cpu);
114 for (i = 0; i < freqs->max_state; i++) {
115 if (freqs->freq_table[i] == CPUFREQ_ENTRY_INVALID)
116 continue;
> 117 cputime = 0;
118 if (freqs->offset + i < p->max_state &&
119 p->time_in_state)
120 cputime = p->time_in_state[freqs->offset + i];
121 seq_printf(m, "%u %lu\n", freqs->freq_table[i],
122 (unsigned long)cputime_to_clock_t(cputime));
123 }
124 }
125 spin_unlock_irqrestore(&task_time_in_state_lock, flags);
126 return 0;
127 }
128
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-21 4:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-21 4:27 [ammarfaizi2-block:google/android/kernel/common/android-4.9-q-release 2199/9999] drivers/cpufreq/cpufreq_times.c:117:35: sparse: sparse: implicit cast to nocast type kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox