powerpc/eeh: Remove unused return path from eeh_pe_dev_traverse()
There are no users of the early-out return value from eeh_pe_dev_traverse(), so remove it. Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/c648070f5b28fe8ca1880b48e64b267959ffd369.1565930772.git.sbobroff@linux.ibm.com
This commit is contained in:
parent
2e25505147
commit
cef50c67c1
|
@ -260,7 +260,7 @@ static inline bool eeh_state_active(int state)
|
|||
== (EEH_STATE_MMIO_ACTIVE | EEH_STATE_DMA_ACTIVE);
|
||||
}
|
||||
|
||||
typedef void *(*eeh_edev_traverse_func)(struct eeh_dev *edev, void *flag);
|
||||
typedef void (*eeh_edev_traverse_func)(struct eeh_dev *edev, void *flag);
|
||||
typedef void *(*eeh_pe_traverse_func)(struct eeh_pe *pe, void *flag);
|
||||
void eeh_set_pe_aux_size(int size);
|
||||
int eeh_phb_pe_create(struct pci_controller *phb);
|
||||
|
@ -274,7 +274,7 @@ int eeh_rmv_from_parent_pe(struct eeh_dev *edev);
|
|||
void eeh_pe_update_time_stamp(struct eeh_pe *pe);
|
||||
void *eeh_pe_traverse(struct eeh_pe *root,
|
||||
eeh_pe_traverse_func fn, void *flag);
|
||||
void *eeh_pe_dev_traverse(struct eeh_pe *root,
|
||||
void eeh_pe_dev_traverse(struct eeh_pe *root,
|
||||
eeh_edev_traverse_func fn, void *flag);
|
||||
void eeh_pe_restore_bars(struct eeh_pe *pe);
|
||||
const char *eeh_pe_loc_get(struct eeh_pe *pe);
|
||||
|
|
|
@ -705,7 +705,7 @@ int eeh_pci_enable(struct eeh_pe *pe, int function)
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void *eeh_disable_and_save_dev_state(struct eeh_dev *edev,
|
||||
static void eeh_disable_and_save_dev_state(struct eeh_dev *edev,
|
||||
void *userdata)
|
||||
{
|
||||
struct pci_dev *pdev = eeh_dev_to_pci_dev(edev);
|
||||
|
@ -716,7 +716,7 @@ static void *eeh_disable_and_save_dev_state(struct eeh_dev *edev,
|
|||
* state for the specified device
|
||||
*/
|
||||
if (!pdev || pdev == dev)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
/* Ensure we have D0 power state */
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
|
@ -729,18 +729,16 @@ static void *eeh_disable_and_save_dev_state(struct eeh_dev *edev,
|
|||
* interrupt from the device
|
||||
*/
|
||||
pci_write_config_word(pdev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *eeh_restore_dev_state(struct eeh_dev *edev, void *userdata)
|
||||
static void eeh_restore_dev_state(struct eeh_dev *edev, void *userdata)
|
||||
{
|
||||
struct pci_dn *pdn = eeh_dev_to_pdn(edev);
|
||||
struct pci_dev *pdev = eeh_dev_to_pci_dev(edev);
|
||||
struct pci_dev *dev = userdata;
|
||||
|
||||
if (!pdev)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
/* Apply customization from firmware */
|
||||
if (pdn && eeh_ops->restore_config)
|
||||
|
@ -749,8 +747,6 @@ static void *eeh_restore_dev_state(struct eeh_dev *edev, void *userdata)
|
|||
/* The caller should restore state for the specified device */
|
||||
if (pdev != dev)
|
||||
pci_restore_state(pdev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int eeh_restore_vf_config(struct pci_dn *pdn)
|
||||
|
@ -876,7 +872,7 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat
|
|||
* the indicated device and its children so that the bunch of the
|
||||
* devices could be reset properly.
|
||||
*/
|
||||
static void *eeh_set_dev_freset(struct eeh_dev *edev, void *flag)
|
||||
static void eeh_set_dev_freset(struct eeh_dev *edev, void *flag)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
unsigned int *freset = (unsigned int *)flag;
|
||||
|
@ -884,8 +880,6 @@ static void *eeh_set_dev_freset(struct eeh_dev *edev, void *flag)
|
|||
dev = eeh_dev_to_pci_dev(edev);
|
||||
if (dev)
|
||||
*freset |= dev->needs_freset;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void eeh_pe_refreeze_passed(struct eeh_pe *root)
|
||||
|
|
|
@ -197,12 +197,12 @@ static void eeh_enable_irq(struct eeh_dev *edev)
|
|||
}
|
||||
}
|
||||
|
||||
static void *eeh_dev_save_state(struct eeh_dev *edev, void *userdata)
|
||||
static void eeh_dev_save_state(struct eeh_dev *edev, void *userdata)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
|
||||
if (!edev)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
/*
|
||||
* We cannot access the config space on some adapters.
|
||||
|
@ -212,14 +212,13 @@ static void *eeh_dev_save_state(struct eeh_dev *edev, void *userdata)
|
|||
* device is created.
|
||||
*/
|
||||
if (edev->pe && (edev->pe->state & EEH_PE_CFG_RESTRICTED))
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
pdev = eeh_dev_to_pci_dev(edev);
|
||||
if (!pdev)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
pci_save_state(pdev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void eeh_set_channel_state(struct eeh_pe *root, enum pci_channel_state s)
|
||||
|
@ -385,12 +384,12 @@ static enum pci_ers_result eeh_report_reset(struct eeh_dev *edev,
|
|||
return driver->err_handler->slot_reset(pdev);
|
||||
}
|
||||
|
||||
static void *eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
static void eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
|
||||
if (!edev)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
/*
|
||||
* The content in the config space isn't saved because
|
||||
|
@ -402,15 +401,14 @@ static void *eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
|||
if (list_is_last(&edev->entry, &edev->pe->edevs))
|
||||
eeh_pe_restore_bars(edev->pe);
|
||||
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
pdev = eeh_dev_to_pci_dev(edev);
|
||||
if (!pdev)
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
pci_restore_state(pdev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -491,7 +489,7 @@ static void *eeh_add_virt_device(struct eeh_dev *edev)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void *eeh_rmv_device(struct eeh_dev *edev, void *userdata)
|
||||
static void eeh_rmv_device(struct eeh_dev *edev, void *userdata)
|
||||
{
|
||||
struct pci_driver *driver;
|
||||
struct pci_dev *dev = eeh_dev_to_pci_dev(edev);
|
||||
|
@ -506,7 +504,7 @@ static void *eeh_rmv_device(struct eeh_dev *edev, void *userdata)
|
|||
*/
|
||||
if (!eeh_edev_actionable(edev) ||
|
||||
(dev->hdr_type == PCI_HEADER_TYPE_BRIDGE))
|
||||
return NULL;
|
||||
return;
|
||||
|
||||
if (rmv_data) {
|
||||
driver = eeh_pcid_get(dev);
|
||||
|
@ -515,7 +513,7 @@ static void *eeh_rmv_device(struct eeh_dev *edev, void *userdata)
|
|||
driver->err_handler->error_detected &&
|
||||
driver->err_handler->slot_reset) {
|
||||
eeh_pcid_put(dev);
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
eeh_pcid_put(dev);
|
||||
}
|
||||
|
@ -548,8 +546,6 @@ static void *eeh_rmv_device(struct eeh_dev *edev, void *userdata)
|
|||
pci_stop_and_remove_bus_device(dev);
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *eeh_pe_detach_dev(struct eeh_pe *pe, void *userdata)
|
||||
|
|
|
@ -231,29 +231,22 @@ void *eeh_pe_traverse(struct eeh_pe *root,
|
|||
* The function is used to traverse the devices of the specified
|
||||
* PE and its child PEs.
|
||||
*/
|
||||
void *eeh_pe_dev_traverse(struct eeh_pe *root,
|
||||
void eeh_pe_dev_traverse(struct eeh_pe *root,
|
||||
eeh_edev_traverse_func fn, void *flag)
|
||||
{
|
||||
struct eeh_pe *pe;
|
||||
struct eeh_dev *edev, *tmp;
|
||||
void *ret;
|
||||
|
||||
if (!root) {
|
||||
pr_warn("%s: Invalid PE %p\n",
|
||||
__func__, root);
|
||||
return NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Traverse root PE */
|
||||
eeh_for_each_pe(root, pe) {
|
||||
eeh_pe_for_each_dev(pe, edev, tmp) {
|
||||
ret = fn(edev, flag);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
eeh_for_each_pe(root, pe)
|
||||
eeh_pe_for_each_dev(pe, edev, tmp)
|
||||
fn(edev, flag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -602,13 +595,11 @@ void eeh_pe_mark_isolated(struct eeh_pe *root)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(eeh_pe_mark_isolated);
|
||||
|
||||
static void *__eeh_pe_dev_mode_mark(struct eeh_dev *edev, void *flag)
|
||||
static void __eeh_pe_dev_mode_mark(struct eeh_dev *edev, void *flag)
|
||||
{
|
||||
int mode = *((int *)flag);
|
||||
|
||||
edev->mode |= mode;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -827,7 +818,7 @@ static void eeh_restore_device_bars(struct eeh_dev *edev)
|
|||
* the expansion ROM base address, the latency timer, and etc.
|
||||
* from the saved values in the device node.
|
||||
*/
|
||||
static void *eeh_restore_one_device_bars(struct eeh_dev *edev, void *flag)
|
||||
static void eeh_restore_one_device_bars(struct eeh_dev *edev, void *flag)
|
||||
{
|
||||
struct pci_dn *pdn = eeh_dev_to_pdn(edev);
|
||||
|
||||
|
@ -839,8 +830,6 @@ static void *eeh_restore_one_device_bars(struct eeh_dev *edev, void *flag)
|
|||
|
||||
if (eeh_ops->restore_config && pdn)
|
||||
eeh_ops->restore_config(pdn);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue