public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH 2/5] driver core: separate function to shutdown one device
       [not found] <20260311171209.9205-2-djeffery@redhat.com>
@ 2026-03-12  5:10 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-12  5:10 UTC (permalink / raw)
  To: David Jeffery, linux-kernel, driver-core, linux-pci, linux-scsi,
	Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich
  Cc: llvm, oe-kbuild-all, Tarun Sahu, Pasha Tatashin,
	Michał Cłapiński, Jordan Richards, Ewan Milne,
	John Meneghini, Lombardi, Maurizio, David Jeffery, Stuart Hayes,
	Laurence Oberman

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-12  5:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260311171209.9205-2-djeffery@redhat.com>
2026-03-12  5:10 ` [PATCH 2/5] driver core: separate function to shutdown one device kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox