public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Schnelle <schnelle@linux.ibm.com>
To: kernel test robot <lkp@intel.com>,
	Bjorn Helgaas <helgaas@kernel.org>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>
Cc: kbuild-all@lists.01.org, linux-s390@vger.kernel.org,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 2/4] PCI: Move jailhouse's isolated function handling to pci_scan_slot()
Date: Wed, 13 Apr 2022 09:55:45 +0200	[thread overview]
Message-ID: <817683ba1c0f0f246701e91395063b3eaf69cbbe.camel@linux.ibm.com> (raw)
In-Reply-To: <202204130045.AeSigvk8-lkp@intel.com>

On Wed, 2022-04-13 at 00:28 +0800, kernel test robot wrote:
> Hi Niklas,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on helgaas-pci/next]
> [also build test WARNING on s390/features tip/x86/core v5.18-rc2 next-20220412]
> [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]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Niklas-Schnelle/PCI-Rework-pci_scan_slot-and-isolated-PCI-functions/20220412-223307
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
> config: alpha-defconfig (https://download.01.org/0day-ci/archive/20220413/202204130045.AeSigvk8-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 11.2.0
> 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
>         # https://github.com/intel-lab-lkp/linux/commit/5cac6729750b7434ff5d6ae99469e9e54bc9fb6e
>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>         git fetch --no-tags linux-review Niklas-Schnelle/PCI-Rework-pci_scan_slot-and-isolated-PCI-functions/20220412-223307
>         git checkout 5cac6729750b7434ff5d6ae99469e9e54bc9fb6e
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/pci/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/pci/probe.c: In function 'pci_scan_child_bus_extend':
> > > drivers/pci/probe.c:2861:13: warning: variable 'nr_devs' set but not used [-Wunused-but-set-variable]
>     2861 |         int nr_devs;
>          |             ^~~~~~~
> 
> 
> vim +/nr_devs +2861 drivers/pci/probe.c
> 
> bccf90d6e063d2 Palmer Dabbelt  2017-06-23  2841  
> 1c02ea81006548 Mika Westerberg 2017-10-13  2842  /**
> 1c02ea81006548 Mika Westerberg 2017-10-13  2843   * pci_scan_child_bus_extend() - Scan devices below a bus
> 1c02ea81006548 Mika Westerberg 2017-10-13  2844   * @bus: Bus to scan for devices
> 1c02ea81006548 Mika Westerberg 2017-10-13  2845   * @available_buses: Total number of buses available (%0 does not try to
> 1c02ea81006548 Mika Westerberg 2017-10-13  2846   *		     extend beyond the minimal)
> 1c02ea81006548 Mika Westerberg 2017-10-13  2847   *
> 1c02ea81006548 Mika Westerberg 2017-10-13  2848   * Scans devices below @bus including subordinate buses. Returns new
> 1c02ea81006548 Mika Westerberg 2017-10-13  2849   * subordinate number including all the found devices. Passing
> 1c02ea81006548 Mika Westerberg 2017-10-13  2850   * @available_buses causes the remaining bus space to be distributed
> 1c02ea81006548 Mika Westerberg 2017-10-13  2851   * equally between hotplug-capable bridges to allow future extension of the
> 1c02ea81006548 Mika Westerberg 2017-10-13  2852   * hierarchy.
> 1c02ea81006548 Mika Westerberg 2017-10-13  2853   */
> 1c02ea81006548 Mika Westerberg 2017-10-13  2854  static unsigned int pci_scan_child_bus_extend(struct pci_bus *bus,
> 1c02ea81006548 Mika Westerberg 2017-10-13  2855  					      unsigned int available_buses)
> 1c02ea81006548 Mika Westerberg 2017-10-13  2856  {
> 1c02ea81006548 Mika Westerberg 2017-10-13  2857  	unsigned int used_buses, normal_bridges = 0, hotplug_bridges = 0;
> 1c02ea81006548 Mika Westerberg 2017-10-13  2858  	unsigned int start = bus->busn_res.start;
> 5cac6729750b74 Niklas Schnelle 2022-04-12  2859  	unsigned int devfn, cmax, max = start;
> ^1da177e4c3f41 Linus Torvalds  2005-04-16  2860  	struct pci_dev *dev;
> 690f4304104f37 Jan Kiszka      2018-03-07 @2861  	int nr_devs;
> ^1da177e4c3f41 Linus Torvalds  2005-04-16  2862  
> 0207c356ef0e2b Bjorn Helgaas   2009-11-04  2863  	dev_dbg(&bus->dev, "scanning bus\n");
> ^1da177e4c3f41 Linus Torvalds  2005-04-16  2864  
> ^1da177e4c3f41 Linus Torvalds  2005-04-16  2865  	/* Go find them, Rover! */
> 5cac6729750b74 Niklas Schnelle 2022-04-12  2866  	for (devfn = 0; devfn < 256; devfn += 8)
> 690f4304104f37 Jan Kiszka      2018-03-07  2867  		nr_devs = pci_scan_slot(bus, devfn);

The bot is right, the nr_devs can be removed as the patch removed the
only read access did so locally already.


  reply	other threads:[~2022-04-13  7:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 14:30 [PATCH v2 0/4] PCI: Rework pci_scan_slot() and isolated PCI functions Niklas Schnelle
2022-04-12 14:30 ` [PATCH v2 1/4] PCI: Clean up pci_scan_slot() Niklas Schnelle
2022-04-12 15:24   ` Niklas Schnelle
2022-04-12 14:30 ` [PATCH v2 2/4] PCI: Move jailhouse's isolated function handling to pci_scan_slot() Niklas Schnelle
2022-04-12 16:28   ` kernel test robot
2022-04-13  7:55     ` Niklas Schnelle [this message]
2022-04-12 19:43   ` kernel test robot
2022-04-12 14:30 ` [PATCH v2 3/4] PCI: Extend isolated function probing to s390 Niklas Schnelle
2022-04-12 14:30 ` [PATCH v2 4/4] s390/pci: allow zPCI zbus without a function zero Niklas Schnelle

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=817683ba1c0f0f246701e91395063b3eaf69cbbe.camel@linux.ibm.com \
    --to=schnelle@linux.ibm.com \
    --cc=helgaas@kernel.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pmorel@linux.ibm.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