[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202109151952.7xsRdodO-lkp@intel.com>
Date: Wed, 15 Sep 2021 19:39:55 +0800
From: kernel test robot <lkp@...el.com>
To: Saravana Kannan <skannan@...eaurora.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, Chanwoo Choi <cw00.choi@...sung.com>,
Sibi Sankar <sibis@...eaurora.org>
Subject: [chanwoo:devfreq-testing 2/4]
drivers/devfreq/governor_passive.c:255:2: error: implicit declaration of
function 'get_online_cpus'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing
head: c27162469a5f04fd237debefc710d28956b9704e
commit: 0e153a22371583fa454d9f54a828bbcb81c074c4 [2/4] PM / devfreq: Add cpu based scaling support to passive governor
config: hexagon-randconfig-r001-20210915 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 8cbbd7e0b2aa21ce7e416cfb63d9965518948c35)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/?id=0e153a22371583fa454d9f54a828bbcb81c074c4
git remote add chanwoo https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git
git fetch --no-tags chanwoo devfreq-testing
git checkout 0e153a22371583fa454d9f54a828bbcb81c074c4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/devfreq/governor_passive.c:255:2: error: implicit declaration of function 'get_online_cpus' [-Werror,-Wimplicit-function-declaration]
get_online_cpus();
^
drivers/devfreq/governor_passive.c:255:2: note: did you mean 'get_online_mems'?
include/linux/memory_hotplug.h:252:20: note: 'get_online_mems' declared here
static inline void get_online_mems(void) {}
^
>> drivers/devfreq/governor_passive.c:305:2: error: implicit declaration of function 'put_online_cpus' [-Werror,-Wimplicit-function-declaration]
put_online_cpus();
^
drivers/devfreq/governor_passive.c:305:2: note: did you mean 'get_online_cpus'?
drivers/devfreq/governor_passive.c:255:2: note: 'get_online_cpus' declared here
get_online_cpus();
^
2 errors generated.
vim +/get_online_cpus +255 drivers/devfreq/governor_passive.c
242
243 static int cpufreq_passive_register_notifier(struct devfreq *devfreq)
244 {
245 struct devfreq_passive_data *p_data
246 = (struct devfreq_passive_data *)devfreq->data;
247 struct device *dev = devfreq->dev.parent;
248 struct opp_table *opp_table = NULL;
249 struct devfreq_cpu_data *cpu_data;
250 struct cpufreq_policy *policy;
251 struct device *cpu_dev;
252 unsigned int cpu;
253 int ret;
254
> 255 get_online_cpus();
256
257 p_data->nb.notifier_call = cpufreq_passive_notifier_call;
258 ret = cpufreq_register_notifier(&p_data->nb, CPUFREQ_TRANSITION_NOTIFIER);
259 if (ret) {
260 dev_err(dev, "failed to register cpufreq notifier\n");
261 p_data->nb.notifier_call = NULL;
262 goto out;
263 }
264
265 for_each_online_cpu(cpu) {
266 if (p_data->cpu_data[cpu])
267 continue;
268
269 policy = cpufreq_cpu_get(cpu);
270 if (policy) {
271 cpu_data = kzalloc(sizeof(*cpu_data), GFP_KERNEL);
272 if (!cpu_data) {
273 ret = -ENOMEM;
274 goto out;
275 }
276
277 cpu_dev = get_cpu_device(cpu);
278 if (!cpu_dev) {
279 dev_err(dev, "failed to get cpu device\n");
280 ret = -ENODEV;
281 goto out;
282 }
283
284 opp_table = dev_pm_opp_get_opp_table(cpu_dev);
285 if (IS_ERR(opp_table)) {
286 ret = PTR_ERR(opp_table);
287 goto out;
288 }
289
290 cpu_data->dev = cpu_dev;
291 cpu_data->opp_table = opp_table;
292 cpu_data->first_cpu = cpumask_first(policy->related_cpus);
293 cpu_data->cur_freq = policy->cur;
294 cpu_data->min_freq = policy->cpuinfo.min_freq;
295 cpu_data->max_freq = policy->cpuinfo.max_freq;
296
297 p_data->cpu_data[cpu] = cpu_data;
298 cpufreq_cpu_put(policy);
299 } else {
300 ret = -EPROBE_DEFER;
301 goto out;
302 }
303 }
304 out:
> 305 put_online_cpus();
306 if (ret)
307 return ret;
308
309 mutex_lock(&devfreq->lock);
310 ret = devfreq_update_target(devfreq, 0L);
311 mutex_unlock(&devfreq->lock);
312 if (ret)
313 dev_err(dev, "failed to update the frequency\n");
314
315 return ret;
316 }
317
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (25940 bytes)
Powered by blists - more mailing lists