[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202501022150.vaVXWOxZ-lkp@intel.com>
Date: Thu, 2 Jan 2025 21:35:55 +0800
From: kernel test robot <lkp@...el.com>
To: Johannes Berg <johannes.berg@...el.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Richard Weinberger <richard@....at>
Subject: drivers/base/power/runtime.c:327: warning: Excess function parameter
'dev' description in '__rpm_callback'
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 56e6a3499e14716b9a28a307bb6d18c10e95301e
commit: 92dcd3d31843fbe1a95d880dc912e1f6beac6632 um: Allow PM with suspend-to-idle
date: 4 years, 1 month ago
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20250102/202501022150.vaVXWOxZ-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250102/202501022150.vaVXWOxZ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501022150.vaVXWOxZ-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/base/power/runtime.c:327: warning: Excess function parameter 'dev' description in '__rpm_callback'
drivers/base/power/runtime.c:926: warning: Function parameter or struct member 'timer' not described in 'pm_suspend_timer_fn'
drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn'
vim +327 drivers/base/power/runtime.c
21d5c57b372616 Rafael J. Wysocki 2016-10-30 319
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 320 /**
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 321 * __rpm_callback - Run a given runtime PM callback for a given device.
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 322 * @cb: Runtime PM callback to run.
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 323 * @dev: Device to run the callback for.
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 324 */
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 325 static int __rpm_callback(int (*cb)(struct device *), struct device *dev)
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 326 __releases(&dev->power.lock) __acquires(&dev->power.lock)
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 @327 {
21d5c57b372616 Rafael J. Wysocki 2016-10-30 328 int retval, idx;
baa8809f60971d Rafael J. Wysocki 2016-10-30 329 bool use_links = dev->power.links_count > 0;
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 330
21d5c57b372616 Rafael J. Wysocki 2016-10-30 331 if (dev->power.irq_safe) {
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 332 spin_unlock(&dev->power.lock);
21d5c57b372616 Rafael J. Wysocki 2016-10-30 333 } else {
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 334 spin_unlock_irq(&dev->power.lock);
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 335
21d5c57b372616 Rafael J. Wysocki 2016-10-30 336 /*
21d5c57b372616 Rafael J. Wysocki 2016-10-30 337 * Resume suppliers if necessary.
21d5c57b372616 Rafael J. Wysocki 2016-10-30 338 *
21d5c57b372616 Rafael J. Wysocki 2016-10-30 339 * The device's runtime PM status cannot change until this
21d5c57b372616 Rafael J. Wysocki 2016-10-30 340 * routine returns, so it is safe to read the status outside of
21d5c57b372616 Rafael J. Wysocki 2016-10-30 341 * the lock.
21d5c57b372616 Rafael J. Wysocki 2016-10-30 342 */
baa8809f60971d Rafael J. Wysocki 2016-10-30 343 if (use_links && dev->power.runtime_status == RPM_RESUMING) {
21d5c57b372616 Rafael J. Wysocki 2016-10-30 344 idx = device_links_read_lock();
21d5c57b372616 Rafael J. Wysocki 2016-10-30 345
21d5c57b372616 Rafael J. Wysocki 2016-10-30 346 retval = rpm_get_suppliers(dev);
21d5c57b372616 Rafael J. Wysocki 2016-10-30 347 if (retval)
21d5c57b372616 Rafael J. Wysocki 2016-10-30 348 goto fail;
21d5c57b372616 Rafael J. Wysocki 2016-10-30 349
21d5c57b372616 Rafael J. Wysocki 2016-10-30 350 device_links_read_unlock(idx);
21d5c57b372616 Rafael J. Wysocki 2016-10-30 351 }
21d5c57b372616 Rafael J. Wysocki 2016-10-30 352 }
21d5c57b372616 Rafael J. Wysocki 2016-10-30 353
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 354 retval = cb(dev);
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 355
21d5c57b372616 Rafael J. Wysocki 2016-10-30 356 if (dev->power.irq_safe) {
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 357 spin_lock(&dev->power.lock);
21d5c57b372616 Rafael J. Wysocki 2016-10-30 358 } else {
21d5c57b372616 Rafael J. Wysocki 2016-10-30 359 /*
21d5c57b372616 Rafael J. Wysocki 2016-10-30 360 * If the device is suspending and the callback has returned
21d5c57b372616 Rafael J. Wysocki 2016-10-30 361 * success, drop the usage counters of the suppliers that have
21d5c57b372616 Rafael J. Wysocki 2016-10-30 362 * been reference counted on its resume.
21d5c57b372616 Rafael J. Wysocki 2016-10-30 363 *
21d5c57b372616 Rafael J. Wysocki 2016-10-30 364 * Do that if resume fails too.
21d5c57b372616 Rafael J. Wysocki 2016-10-30 365 */
baa8809f60971d Rafael J. Wysocki 2016-10-30 366 if (use_links
baa8809f60971d Rafael J. Wysocki 2016-10-30 367 && ((dev->power.runtime_status == RPM_SUSPENDING && !retval)
baa8809f60971d Rafael J. Wysocki 2016-10-30 368 || (dev->power.runtime_status == RPM_RESUMING && retval))) {
21d5c57b372616 Rafael J. Wysocki 2016-10-30 369 idx = device_links_read_lock();
21d5c57b372616 Rafael J. Wysocki 2016-10-30 370
21d5c57b372616 Rafael J. Wysocki 2016-10-30 371 fail:
21d5c57b372616 Rafael J. Wysocki 2016-10-30 372 rpm_put_suppliers(dev);
21d5c57b372616 Rafael J. Wysocki 2016-10-30 373
21d5c57b372616 Rafael J. Wysocki 2016-10-30 374 device_links_read_unlock(idx);
21d5c57b372616 Rafael J. Wysocki 2016-10-30 375 }
21d5c57b372616 Rafael J. Wysocki 2016-10-30 376
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 377 spin_lock_irq(&dev->power.lock);
21d5c57b372616 Rafael J. Wysocki 2016-10-30 378 }
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 379
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 380 return retval;
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 381 }
ad3c36a534bc7b Rafael J. Wysocki 2011-09-27 382
:::::: The code at line 327 was first introduced by commit
:::::: ad3c36a534bc7b945d7bffdda1c62e13bf93489a PM / Runtime: Don't run callbacks under lock for power.irq_safe set
:::::: TO: Rafael J. Wysocki <rjw@...k.pl>
:::::: CC: Rafael J. Wysocki <rjw@...k.pl>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists