[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202010141821.697guB6a-lkp@intel.com>
Date: Wed, 14 Oct 2020 18:23:05 +0800
From: kernel test robot <lkp@...el.com>
To: Kuppuswamy Sathyanarayanan
<sathyanarayanan.nkuppuswamy@...il.com>, bhelgaas@...gle.com,
okaya@...nel.org
Cc: kbuild-all@...ts.01.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, ashok.raj@...el.com,
sathyanarayanan.kuppuswamy@...ux.intel.com
Subject: Re: [PATCH v5 2/2] PCI/ERR: Split the fatal and non-fatal error
recovery handling
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@...el.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
Download attachment ".config.gz" of type "application/gzip" (65100 bytes)
Powered by blists - more mailing lists