[pci:pci/06-22-oza-aer 5/7] drivers/pci/pcie/err.c:255:4: error: implicit declaration of function 'pci_aer_clear_device_status'; did you mean 'pcie_clear_root_pme_status'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/06-22-oza-aer
head:   2736412b695cac0505ac33515d07d5cfe34bfc03
commit: 202d4bb54b2e7e98c13de08b065e03e94567c661 [5/7] PCI/AER: Clear device status bits during ERR_FATAL and ERR_NONFATAL
config: i386-randconfig-x010-201828 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        git checkout 202d4bb54b2e7e98c13de08b065e03e94567c661
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/pci/pcie/err.c: In function 'broadcast_error_message':
>> drivers/pci/pcie/err.c:255:4: error: implicit declaration of function 'pci_aer_clear_device_status'; did you mean 'pcie_clear_root_pme_status'? [-Werror=implicit-function-declaration]
       pci_aer_clear_device_status(dev);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
       pcie_clear_root_pme_status
   drivers/pci/pcie/err.c: In function 'pcie_do_fatal_recovery':
   drivers/pci/pcie/err.c:315:3: error: implicit declaration of function 'pci_aer_clear_fatal_status'; did you mean 'pcie_clear_root_pme_status'? [-Werror=implicit-function-declaration]
      pci_aer_clear_fatal_status(dev);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
      pcie_clear_root_pme_status
   Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit
   Cyclomatic Complexity 1 include/linux/kobject.h:kobject_name
   Cyclomatic Complexity 2 include/linux/device.h:dev_name
   Cyclomatic Complexity 1 include/linux/pci.h:pci_name
   Cyclomatic Complexity 1 include/linux/aer.h:pci_cleanup_aer_uncorrect_error_status
   Cyclomatic Complexity 1 drivers/pci/pcie/../pci.h:pci_has_subordinate
   Cyclomatic Complexity 1 drivers/pci/pcie/../pci.h:pci_dev_set_disconnected
   Cyclomatic Complexity 6 drivers/pci/pcie/err.c:merge_result
   Cyclomatic Complexity 5 drivers/pci/pcie/err.c:broadcast_error_message
   Cyclomatic Complexity 1 drivers/pci/pcie/err.c:default_reset_link
   Cyclomatic Complexity 6 drivers/pci/pcie/err.c:reset_link
   Cyclomatic Complexity 1 include/linux/device.h:device_lock
   Cyclomatic Complexity 1 include/linux/device.h:device_unlock
   Cyclomatic Complexity 4 drivers/pci/pcie/err.c:report_resume
   Cyclomatic Complexity 4 drivers/pci/pcie/err.c:report_slot_reset
   Cyclomatic Complexity 4 drivers/pci/pcie/err.c:report_mmio_enabled
   Cyclomatic Complexity 8 drivers/pci/pcie/err.c:report_error_detected
   Cyclomatic Complexity 11 drivers/pci/pcie/err.c:pcie_do_fatal_recovery
   Cyclomatic Complexity 4 drivers/pci/pcie/err.c:pcie_do_nonfatal_recovery
   cc1: some warnings being treated as errors

vim +255 drivers/pci/pcie/err.c

   218	
   219	/**
   220	 * broadcast_error_message - handle message broadcast to downstream drivers
   221	 * @dev: pointer to from where in a hierarchy message is broadcasted down
   222	 * @state: error state
   223	 * @error_mesg: message to print
   224	 * @cb: callback to be broadcasted
   225	 *
   226	 * Invoked during error recovery process. Once being invoked, the content
   227	 * of error severity will be broadcasted to all downstream drivers in a
   228	 * hierarchy in question.
   229	 */
   230	static pci_ers_result_t broadcast_error_message(struct pci_dev *dev,
   231		enum pci_channel_state state,
   232		char *error_mesg,
   233		int (*cb)(struct pci_dev *, void *))
   234	{
   235		struct aer_broadcast_data result_data;
   236	
   237		pci_printk(KERN_DEBUG, dev, "broadcast %s message\n", error_mesg);
   238		result_data.state = state;
   239		if (cb == report_error_detected)
   240			result_data.result = PCI_ERS_RESULT_CAN_RECOVER;
   241		else
   242			result_data.result = PCI_ERS_RESULT_RECOVERED;
   243	
   244		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
   245			/*
   246			 * If the error is reported by a bridge, we think this error
   247			 * is related to the downstream link of the bridge, so we
   248			 * do error recovery on all subordinates of the bridge instead
   249			 * of the bridge and clear the error status of the bridge.
   250			 */
   251			if (cb == report_error_detected)
   252				dev->error_state = state;
   253			pci_walk_bus(dev->subordinate, cb, &result_data);
   254			if (cb == report_resume) {
 > 255				pci_aer_clear_device_status(dev);
   256				pci_cleanup_aer_uncorrect_error_status(dev);
   257				dev->error_state = pci_channel_io_normal;
   258			}
   259		} else {
   260			/*
   261			 * If the error is reported by an end point, we think this
   262			 * error is related to the upstream link of the end point.
   263			 * The error is non fatal so the bus is ok; just invoke
   264			 * the callback for the function that logged the error.
   265			 */
   266			cb(dev, &result_data);
   267		}
   268	
   269		return result_data.result;
   270	}
   271	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux