--- zzzz-none-000/linux-2.6.39.4/drivers/pci/pcie/portdrv_pci.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/drivers/pci/pcie/portdrv_pci.c 2021-11-10 13:38:15.000000000 +0000 @@ -73,7 +73,11 @@ pci_write_config_dword(dev, rtsta_pos, rtsta); } +#ifdef CONFIG_ARCH_GEN3 +int pcie_portdrv_restore_config(struct pci_dev *dev) +#else static int pcie_portdrv_restore_config(struct pci_dev *dev) +#endif { int retval; @@ -187,10 +191,9 @@ enum pci_channel_state error) { struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; - int ret; /* can not fail */ - ret = device_for_each_child(&dev->dev, &data, error_detected_iter); + device_for_each_child(&dev->dev, &data, error_detected_iter); return data.result; } @@ -223,10 +226,9 @@ static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) { pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; - int retval; /* get true return value from &status */ - retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter); + device_for_each_child(&dev->dev, &status, mmio_enabled_iter); return status; } @@ -258,7 +260,6 @@ static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) { pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; - int retval; /* If fatal, restore cfg space for possible link reset at upstream */ if (dev->error_state == pci_channel_io_frozen) { @@ -269,7 +270,7 @@ } /* get true return value from &status */ - retval = device_for_each_child(&dev->dev, &status, slot_reset_iter); + device_for_each_child(&dev->dev, &status, slot_reset_iter); return status; } @@ -296,9 +297,8 @@ static void pcie_portdrv_err_resume(struct pci_dev *dev) { - int retval; /* nothing to do with error value, if it ever happens */ - retval = device_for_each_child(&dev->dev, NULL, resume_iter); + device_for_each_child(&dev->dev, NULL, resume_iter); } /*