linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Mark Brown <broonie@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
	"Oleksij Rempel" <o.rempel@pengutronix.de>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-pm@vger.kernel.org,
	"Søren Andersen" <san@skov.dk>
Subject: Re: [PATCH v1 1/3] driver core: move core part of device_shutdown() to a separate function
Date: Sat, 25 Nov 2023 04:04:30 +0800	[thread overview]
Message-ID: <202311250213.Ba7c2l5R-lkp@intel.com> (raw)
In-Reply-To: <20231124145338.3112416-2-o.rempel@pengutronix.de>

Hi Oleksij,

kernel test robot noticed the following build warnings:

[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on driver-core/driver-core-next driver-core/driver-core-linus linus/master v6.7-rc2 next-20231124]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Oleksij-Rempel/driver-core-move-core-part-of-device_shutdown-to-a-separate-function/20231124-225602
base:   driver-core/driver-core-testing
patch link:    https://lore.kernel.org/r/20231124145338.3112416-2-o.rempel%40pengutronix.de
patch subject: [PATCH v1 1/3] driver core: move core part of device_shutdown() to a separate function
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20231125/202311250213.Ba7c2l5R-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/20231125/202311250213.Ba7c2l5R-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311250213.Ba7c2l5R-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/base/core.c:4731: warning: expecting prototype for device_shutdown_one(). Prototype was for device_shutdown_one_locked() instead


vim +4731 drivers/base/core.c

b8f33e5d76a7a1 Christian Brauner  2020-02-27  4721  
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4722  /**
52950bfb3bedfc Oleksij Rempel     2023-11-24  4723   * device_shutdown_one - shut down a device
52950bfb3bedfc Oleksij Rempel     2023-11-24  4724   * @dev: device to shut down
52950bfb3bedfc Oleksij Rempel     2023-11-24  4725   *
52950bfb3bedfc Oleksij Rempel     2023-11-24  4726   * It is called with the device lock held.
52950bfb3bedfc Oleksij Rempel     2023-11-24  4727   *
52950bfb3bedfc Oleksij Rempel     2023-11-24  4728   * The device must be on the devices_kset list.
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4729   */
52950bfb3bedfc Oleksij Rempel     2023-11-24  4730  static void device_shutdown_one_locked(struct device *dev)
37b0c020343080 Greg Kroah-Hartman 2007-11-26 @4731  {
52950bfb3bedfc Oleksij Rempel     2023-11-24  4732  	struct device *parent;
d1c6c030fcec6f Ming Lei           2012-06-22  4733  
52950bfb3bedfc Oleksij Rempel     2023-11-24  4734  	lockdep_assert_held(&devices_kset->list_lock);
d1c6c030fcec6f Ming Lei           2012-06-22  4735  	/*
d1c6c030fcec6f Ming Lei           2012-06-22  4736  	 * hold reference count of device's parent to
d1c6c030fcec6f Ming Lei           2012-06-22  4737  	 * prevent it from being freed because parent's
d1c6c030fcec6f Ming Lei           2012-06-22  4738  	 * lock is to be held
d1c6c030fcec6f Ming Lei           2012-06-22  4739  	 */
f123db8e9d6c84 Benson Leung       2013-09-24  4740  	parent = get_device(dev->parent);
6245838fe4d2ce Hugh Daschbach     2010-03-22  4741  	get_device(dev);
6245838fe4d2ce Hugh Daschbach     2010-03-22  4742  	/*
6245838fe4d2ce Hugh Daschbach     2010-03-22  4743  	 * Make sure the device is off the kset list, in the
6245838fe4d2ce Hugh Daschbach     2010-03-22  4744  	 * event that dev->*->shutdown() doesn't remove it.
6245838fe4d2ce Hugh Daschbach     2010-03-22  4745  	 */
6245838fe4d2ce Hugh Daschbach     2010-03-22  4746  	list_del_init(&dev->kobj.entry);
6245838fe4d2ce Hugh Daschbach     2010-03-22  4747  	spin_unlock(&devices_kset->list_lock);
fe6b91f47080eb Alan Stern         2011-12-06  4748  
d1c6c030fcec6f Ming Lei           2012-06-22  4749  	/* hold lock to avoid race with probe/release */
f123db8e9d6c84 Benson Leung       2013-09-24  4750  	if (parent)
f123db8e9d6c84 Benson Leung       2013-09-24  4751  		device_lock(parent);
d1c6c030fcec6f Ming Lei           2012-06-22  4752  	device_lock(dev);
d1c6c030fcec6f Ming Lei           2012-06-22  4753  
fe6b91f47080eb Alan Stern         2011-12-06  4754  	/* Don't allow any more runtime suspends */
fe6b91f47080eb Alan Stern         2011-12-06  4755  	pm_runtime_get_noresume(dev);
fe6b91f47080eb Alan Stern         2011-12-06  4756  	pm_runtime_barrier(dev);
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4757  
7521621e600aee Michal Suchanek    2017-08-11  4758  	if (dev->class && dev->class->shutdown_pre) {
f77af151658474 Josh Zimmerman     2017-06-25  4759  		if (initcall_debug)
7521621e600aee Michal Suchanek    2017-08-11  4760  			dev_info(dev, "shutdown_pre\n");
7521621e600aee Michal Suchanek    2017-08-11  4761  		dev->class->shutdown_pre(dev);
7521621e600aee Michal Suchanek    2017-08-11  4762  	}
7521621e600aee Michal Suchanek    2017-08-11  4763  	if (dev->bus && dev->bus->shutdown) {
0246c4fafccd6c ShuoX Liu          2012-11-23  4764  		if (initcall_debug)
0246c4fafccd6c ShuoX Liu          2012-11-23  4765  			dev_info(dev, "shutdown\n");
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4766  		dev->bus->shutdown(dev);
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4767  	} else if (dev->driver && dev->driver->shutdown) {
0246c4fafccd6c ShuoX Liu          2012-11-23  4768  		if (initcall_debug)
0246c4fafccd6c ShuoX Liu          2012-11-23  4769  			dev_info(dev, "shutdown\n");
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4770  		dev->driver->shutdown(dev);
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4771  	}
d1c6c030fcec6f Ming Lei           2012-06-22  4772  
d1c6c030fcec6f Ming Lei           2012-06-22  4773  	device_unlock(dev);
f123db8e9d6c84 Benson Leung       2013-09-24  4774  	if (parent)
f123db8e9d6c84 Benson Leung       2013-09-24  4775  		device_unlock(parent);
d1c6c030fcec6f Ming Lei           2012-06-22  4776  
6245838fe4d2ce Hugh Daschbach     2010-03-22  4777  	put_device(dev);
f123db8e9d6c84 Benson Leung       2013-09-24  4778  	put_device(parent);
6245838fe4d2ce Hugh Daschbach     2010-03-22  4779  
6245838fe4d2ce Hugh Daschbach     2010-03-22  4780  	spin_lock(&devices_kset->list_lock);
37b0c020343080 Greg Kroah-Hartman 2007-11-26  4781  }
52950bfb3bedfc Oleksij Rempel     2023-11-24  4782  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2023-11-24 20:04 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-24 14:53 [PATCH v1 0/3] introduce priority-based shutdown support Oleksij Rempel
2023-11-24 14:53 ` [PATCH v1 1/3] driver core: move core part of device_shutdown() to a separate function Oleksij Rempel
2023-11-24 15:07   ` Greg Kroah-Hartman
2023-11-24 20:04   ` kernel test robot [this message]
2023-11-24 14:53 ` [PATCH v1 2/3] driver core: introduce prioritized device shutdown sequence Oleksij Rempel
2023-11-24 15:10   ` Greg Kroah-Hartman
2023-11-24 14:53 ` [PATCH v1 3/3] mmc: core: increase shutdown priority for MMC devices Oleksij Rempel
2023-11-24 15:05 ` [PATCH v1 0/3] introduce priority-based shutdown support Greg Kroah-Hartman
2023-11-24 15:21   ` Mark Brown
2023-11-24 15:27     ` Greg Kroah-Hartman
2023-11-24 15:49       ` Mark Brown
2023-11-24 15:56         ` Greg Kroah-Hartman
2023-11-24 16:32           ` Oleksij Rempel
2023-11-24 17:26             ` Greg Kroah-Hartman
2023-11-24 18:57               ` Oleksij Rempel
2023-11-25  6:51                 ` Greg Kroah-Hartman
2023-11-25  8:50                   ` Oleksij Rempel
2023-11-25  9:09                     ` Greg Kroah-Hartman
2023-11-25 10:30                       ` Mark Brown
2023-11-25 14:35                         ` Greg Kroah-Hartman
2023-11-25 15:43                           ` Mark Brown
2023-11-25 19:58                             ` Greg Kroah-Hartman
2023-11-26 10:14                               ` Mark Brown
2023-11-26 19:31                                 ` Oleksij Rempel
2023-11-27 11:27                                   ` Christian Loehle
2023-11-27 11:44                                     ` Oleksij Rempel
2023-11-27 11:57                                       ` Christian Loehle
2023-11-26 19:42                                 ` Ferry Toth
2023-11-27 14:09                                   ` Mark Brown
2023-11-27 10:13                     ` Christian Loehle
2023-11-27 11:36                       ` Oleksij Rempel
2023-11-30 21:59                         ` Francesco Dolcini
2023-11-27 12:54               ` Matti Vaittinen
2023-11-27 13:08                 ` Greg Kroah-Hartman
2023-11-27 14:24                   ` Mark Brown
2023-11-27 14:49                   ` Matti Vaittinen
2023-11-27 16:23                     ` Mark Brown
2023-11-30  9:57 ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202311250213.Ba7c2l5R-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=san@skov.dk \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).