public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Jeffery <djeffery@redhat.com>,
	linux-kernel@vger.kernel.org, driver-core@lists.linux.dev,
	linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Tarun Sahu" <tarunsahu@google.com>,
	"Pasha Tatashin" <tatashin@google.com>,
	"Michał Cłapiński" <mclapinski@google.com>,
	"Jordan Richards" <jordanrichards@google.com>,
	"Ewan Milne" <emilne@redhat.com>,
	"John Meneghini" <jmeneghi@redhat.com>,
	"Lombardi, Maurizio" <mlombard@redhat.com>,
	"David Jeffery" <djeffery@redhat.com>,
	"Stuart Hayes" <stuart.w.hayes@gmail.com>,
	"Laurence Oberman" <loberman@redhat.com>
Subject: Re: [PATCH 2/5] driver core: separate function to shutdown one device
Date: Thu, 12 Mar 2026 06:10:51 +0100	[thread overview]
Message-ID: <202603120643.h7j4avWA-lkp@intel.com> (raw)
In-Reply-To: <20260311171209.9205-2-djeffery@redhat.com>

Hi David,

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 jejb-scsi/for-next mkp-scsi/for-next linus/master v7.0-rc3 next-20260311]
[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/David-Jeffery/driver-core-separate-function-to-shutdown-one-device/20260312-011646
base:   driver-core/driver-core-testing
patch link:    https://lore.kernel.org/r/20260311171209.9205-2-djeffery%40redhat.com
patch subject: [PATCH 2/5] driver core: separate function to shutdown one device
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260312/202603120643.h7j4avWA-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260312/202603120643.h7j4avWA-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/202603120643.h7j4avWA-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/base/core.c:4824:23: warning: variable 'parent' set but not used [-Wunused-but-set-variable]
    4824 |         struct device *dev, *parent;
         |                              ^
   1 warning generated.


vim +/parent +4824 drivers/base/core.c

f9dcdf9ae03c404 David Jeffery      2026-03-11  4818  
37b0c0203430802 Greg Kroah-Hartman 2007-11-26  4819  /**
37b0c0203430802 Greg Kroah-Hartman 2007-11-26  4820   * device_shutdown - call ->shutdown() on each device to shutdown.
37b0c0203430802 Greg Kroah-Hartman 2007-11-26  4821   */
37b0c0203430802 Greg Kroah-Hartman 2007-11-26  4822  void device_shutdown(void)
37b0c0203430802 Greg Kroah-Hartman 2007-11-26  4823  {
f123db8e9d6c84c Benson Leung       2013-09-24 @4824  	struct device *dev, *parent;
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4825  
3297c8fc65af5d4 Pingfan Liu        2018-07-19  4826  	wait_for_device_probe();
3297c8fc65af5d4 Pingfan Liu        2018-07-19  4827  	device_block_probing();
3297c8fc65af5d4 Pingfan Liu        2018-07-19  4828  
65650b35133ff20 Rafael J. Wysocki  2019-10-09  4829  	cpufreq_suspend();
65650b35133ff20 Rafael J. Wysocki  2019-10-09  4830  
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4831  	spin_lock(&devices_kset->list_lock);
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4832  	/*
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4833  	 * Walk the devices list backward, shutting down each in turn.
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4834  	 * Beware that device unplug events may also start pulling
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4835  	 * devices offline, even as the system is shutting down.
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4836  	 */
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4837  	while (!list_empty(&devices_kset->list)) {
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4838  		dev = list_entry(devices_kset->list.prev, struct device,
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4839  				kobj.entry);
d1c6c030fcec6f8 Ming Lei           2012-06-22  4840  
d1c6c030fcec6f8 Ming Lei           2012-06-22  4841  		/*
d1c6c030fcec6f8 Ming Lei           2012-06-22  4842  		 * hold reference count of device's parent to
d1c6c030fcec6f8 Ming Lei           2012-06-22  4843  		 * prevent it from being freed because parent's
d1c6c030fcec6f8 Ming Lei           2012-06-22  4844  		 * lock is to be held
d1c6c030fcec6f8 Ming Lei           2012-06-22  4845  		 */
f123db8e9d6c84c Benson Leung       2013-09-24  4846  		parent = get_device(dev->parent);
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4847  		get_device(dev);
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4848  		/*
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4849  		 * Make sure the device is off the kset list, in the
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4850  		 * event that dev->*->shutdown() doesn't remove it.
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4851  		 */
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4852  		list_del_init(&dev->kobj.entry);
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4853  		spin_unlock(&devices_kset->list_lock);
fe6b91f47080eb1 Alan Stern         2011-12-06  4854  
f9dcdf9ae03c404 David Jeffery      2026-03-11  4855  		shutdown_one_device(dev);
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4856  
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4857  		spin_lock(&devices_kset->list_lock);
37b0c0203430802 Greg Kroah-Hartman 2007-11-26  4858  	}
6245838fe4d2ce4 Hugh Daschbach     2010-03-22  4859  	spin_unlock(&devices_kset->list_lock);
37b0c0203430802 Greg Kroah-Hartman 2007-11-26  4860  }
99bcf217183e02e Joe Perches        2010-06-27  4861  

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

           reply	other threads:[~2026-03-12  5:11 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20260311171209.9205-2-djeffery@redhat.com>]

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=202603120643.h7j4avWA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dakr@kernel.org \
    --cc=djeffery@redhat.com \
    --cc=driver-core@lists.linux.dev \
    --cc=emilne@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jmeneghi@redhat.com \
    --cc=jordanrichards@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=loberman@redhat.com \
    --cc=mclapinski@google.com \
    --cc=mlombard@redhat.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=stuart.w.hayes@gmail.com \
    --cc=tarunsahu@google.com \
    --cc=tatashin@google.com \
    /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