Re: [PATCH v2 09/11] misc: throttler: Add core support for non-thermal throttling

From: kbuild test robot
Date: Sat Jun 09 2018 - 00:35:44 EST


Hi Matthias,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17 next-20180608]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Matthias-Kaehlcke/Add-throttler-driver-for-non-thermal-throttling/20180609-061437
config: openrisc-allmodconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc

All errors (new ones prefixed by >>):

drivers/misc/throttler/core.c: In function 'thr_cpufreq_update_policy':
>> drivers/misc/throttler/core.c:417:3: error: implicit declaration of function 'cpufreq_update_policy' [-Werror=implicit-function-declaration]
cpufreq_update_policy(cftd->cpu);
^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

vim +/cpufreq_update_policy +417 drivers/misc/throttler/core.c

391
392 static void thr_cpufreq_update_policy(struct throttler *thr)
393 {
394 struct cpufreq_thrdev *cftd;
395
396 WARN_ON(!mutex_is_locked(&thr->lock));
397
398 list_for_each_entry(cftd, &thr->cpufreq.list, node) {
399 struct cpufreq_policy *policy = cpufreq_cpu_get(cftd->cpu);
400
401 if (!policy) {
402 dev_warn(thr->dev,
403 "CPU%d does have no cpufreq policy!\n",
404 cftd->cpu);
405 continue;
406 }
407
408 /*
409 * The lock isn't really needed in this function, the list
410 * of cpufreq devices can be extended, but no items are
411 * deleted during the lifetime of the throttler. Releasing
412 * the lock is necessary since cpufreq_update_policy() ends
413 * up calling thr_handle_cpufreq_event(), which needs to
414 * acquire the lock.
415 */
416 mutex_unlock(&thr->lock);
> 417 cpufreq_update_policy(cftd->cpu);
418 mutex_lock(&thr->lock);
419
420 cpufreq_cpu_put(policy);
421 }
422 }
423

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip