linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kuppuswamy Sathyanarayanan 
	<sathyanarayanan.nkuppuswamy@gmail.com>,
	bhelgaas@google.com, okaya@kernel.org
Cc: kbuild-all@lists.01.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, ashok.raj@intel.com,
	sathyanarayanan.kuppuswamy@linux.intel.com
Subject: Re: [PATCH v5 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling
Date: Wed, 14 Oct 2020 18:23:05 +0800	[thread overview]
Message-ID: <202010141821.697guB6a-lkp@intel.com> (raw)
In-Reply-To: <620c14bf5c96c775afb65e54a946ac6e47b9e5e5.1602632140.git.sathyanarayanan.kuppuswamy@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 4251 bytes --]

Hi Kuppuswamy,

I love your patch! Yet something to improve:

[auto build test ERROR on pci/next]
[also build test ERROR on v5.9]
[cannot apply to next-20201013]
[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/0day-ci/linux/commits/Kuppuswamy-Sathyanarayanan/PCI-ERR-Call-pci_bus_reset-before-calling-slot_reset-callback/20201014-172736
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/7c892978aa57817ac512ea311d0d87dd6e1ced80
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Kuppuswamy-Sathyanarayanan/PCI-ERR-Call-pci_bus_reset-before-calling-slot_reset-callback/20201014-172736
        git checkout 7c892978aa57817ac512ea311d0d87dd6e1ced80
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/pci/pcie/err.c:144:25: error: static declaration of 'pcie_do_fatal_recovery' follows non-static declaration
     144 | static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
         |                         ^~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/pci/pcie/err.c:21:
   drivers/pci/pcie/../pci.h:559:18: note: previous declaration of 'pcie_do_fatal_recovery' was here
     559 | pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
         |                  ^~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/pcie/err.c:144:25: warning: 'pcie_do_fatal_recovery' defined but not used [-Wunused-function]
     144 | static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
         |                         ^~~~~~~~~~~~~~~~~~~~~~

vim +/pcie_do_fatal_recovery +144 drivers/pci/pcie/err.c

   143	
 > 144	static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
   145				pci_ers_result_t (*reset_link)(struct pci_dev *pdev))
   146	{
   147		struct pci_dev *udev;
   148		struct pci_bus *parent;
   149		struct pci_dev *pdev, *temp;
   150		pci_ers_result_t result;
   151	
   152		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
   153			udev = dev;
   154		else
   155			udev = dev->bus->self;
   156	
   157		parent = udev->subordinate;
   158		pci_walk_bus(parent, pci_dev_set_disconnected, NULL);
   159	
   160	        pci_lock_rescan_remove();
   161	        pci_dev_get(dev);
   162	        list_for_each_entry_safe_reverse(pdev, temp, &parent->devices,
   163						 bus_list) {
   164			pci_stop_and_remove_bus_device(pdev);
   165		}
   166	
   167		result = reset_link(udev);
   168	
   169		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
   170			/*
   171			 * If the error is reported by a bridge, we think this error
   172			 * is related to the downstream link of the bridge, so we
   173			 * do error recovery on all subordinates of the bridge instead
   174			 * of the bridge and clear the error status of the bridge.
   175			 */
   176			pci_aer_clear_fatal_status(dev);
   177			if (pcie_aer_is_native(dev))
   178				pcie_clear_device_status(dev);
   179		}
   180	
   181		if (result == PCI_ERS_RESULT_RECOVERED) {
   182			if (pcie_wait_for_link(udev, true))
   183				pci_rescan_bus(udev->bus);
   184			pci_info(dev, "Device recovery from fatal error successful\n");
   185	        } else {
   186			pci_uevent_ers(dev, PCI_ERS_RESULT_DISCONNECT);
   187			pci_info(dev, "Device recovery from fatal error failed\n");
   188	        }
   189	
   190		pci_dev_put(dev);
   191		pci_unlock_rescan_remove();
   192	
   193		return result;
   194	}
   195	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65100 bytes --]

  reply	other threads:[~2020-10-14 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 23:45 [PATCH v5 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback Kuppuswamy Sathyanarayanan
2020-10-13 23:45 ` [PATCH v5 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling Kuppuswamy Sathyanarayanan
2020-10-14 10:23   ` kernel test robot [this message]
2020-10-14 14:18   ` kernel test robot
2020-10-14  0:03 ` [PATCH v5 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback Raj, Ashok

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=202010141821.697guB6a-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=bhelgaas@google.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=okaya@kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=sathyanarayanan.nkuppuswamy@gmail.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;
as well as URLs for NNTP newsgroup(s).