> -static pci_ers_result_t reset_link(struct pci_dev *dev, u32 service) > +static pci_ers_result_t reset_link(struct pci_dev *dev, > + pci_ers_result_t (*reset_cb)(struct pci_dev *pdev)) > { > pci_ers_result_t status; > - struct pcie_port_service_driver *driver = NULL; > > - driver = pcie_port_find_service(dev, service); > - if (driver && driver->reset_link) { > - status = driver->reset_link(dev); > + if (reset_cb) { > + status = reset_cb(dev); As far as I can tell reset_cb is never NULL. So all the code below is dead, and the remainder of reset_link is so trivial that it can be inlined into the only caller.