Re: [PATCH v5 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling
From: kernel test robot
Date: Wed Oct 14 2020 - 10:19:14 EST
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: x86_64-randconfig-a004-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# 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=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
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
static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
^
drivers/pci/pcie/../pci.h:559:18: note: previous declaration is here
pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev,
^
1 error generated.
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@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip