tree: https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing head: 52c939f2c35e2e9108daef8da5dda2c9eca80532 commit: 52c939f2c35e2e9108daef8da5dda2c9eca80532 [4/4] PM / devfreq: passive: Update frequency when start governor config: x86_64-randconfig-r031-20210715 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0e49c54a8cbd3e779e5526a5888c683c01cc3c50) 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 # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git/commit/?id=52c939f2c35e2e9108daef8da5dda2c9eca80532 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 52c939f2c35e2e9108daef8da5dda2c9eca80532 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/devfreq/governor_passive.c:352:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] ret = devfreq_update_target(devfreq, parent->previous_freq); ^ drivers/devfreq/governor_passive.c:350:3: note: previous statement is here if (parent->previous_freq) ^ 1 warning generated. vim +/if +352 drivers/devfreq/governor_passive.c 322 323 static int devfreq_passive_event_handler(struct devfreq *devfreq, 324 unsigned int event, void *data) 325 { 326 struct devfreq_passive_data *p_data 327 = (struct devfreq_passive_data *)devfreq->data; 328 struct devfreq *parent = (struct devfreq *)p_data->parent; 329 struct notifier_block *nb = &p_data->nb; 330 int ret = 0; 331 332 if (p_data->parent_type == DEVFREQ_PARENT_DEV && !parent) 333 return -EPROBE_DEFER; 334 335 switch (event) { 336 case DEVFREQ_GOV_START: 337 if (!p_data->this) 338 p_data->this = devfreq; 339 340 /* 341 * If the parent device changes the their frequency before 342 * registering the passive device, the passive device cannot 343 * receive the notification from parent device and then the 344 * passive device cannot be able to set the proper frequency 345 * according to the frequency of parent device. 346 * 347 * When start the passive governor, update the frequency 348 * according to the frequency of parent device. 349 */ 350 if (parent->previous_freq) 351 mutex_lock(&devfreq->lock); > 352 ret = devfreq_update_target(devfreq, parent->previous_freq); 353 if (ret < 0) { 354 dev_warn(&devfreq->dev, 355 "failed to update devfreq using passive governor\n"); 356 mutex_unlock(&devfreq->lock); 357 } 358 359 if (p_data->parent_type == DEVFREQ_PARENT_DEV) { 360 nb->notifier_call = devfreq_passive_notifier_call; 361 ret = devfreq_register_notifier(parent, nb, 362 DEVFREQ_TRANSITION_NOTIFIER); 363 } else if (p_data->parent_type == CPUFREQ_PARENT_DEV) { 364 ret = cpufreq_passive_register_notifier(devfreq); 365 } else { 366 ret = -EINVAL; 367 } 368 break; 369 case DEVFREQ_GOV_STOP: 370 if (p_data->parent_type == DEVFREQ_PARENT_DEV) 371 WARN_ON(devfreq_unregister_notifier(parent, nb, 372 DEVFREQ_TRANSITION_NOTIFIER)); 373 else if (p_data->parent_type == CPUFREQ_PARENT_DEV) 374 WARN_ON(cpufreq_passive_unregister_notifier(devfreq)); 375 else 376 ret = -EINVAL; 377 break; 378 default: 379 break; 380 } 381 382 return ret; 383 } 384 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org