@@ -66,24 +66,15 @@ static int dpc_wait_rp_inactive(struct dpc_dev *dpc)
static pci_ers_result_t dpc_reset_link(struct pci_dev *pdev)
{
- struct dpc_dev *dpc;
- struct pcie_device *pciedev;
- struct device *devdpc;
-
- u16 cap;
-
- /*
- * DPC disables the Link automatically in hardware, so it has
- * already been reset by the time we get here.
- */
- devdpc = pcie_port_find_device(pdev, PCIE_PORT_SERVICE_DPC);
- pciedev = to_pcie_device(devdpc);
- dpc = get_service_data(pciedev);
- cap = dpc->cap_pos;
+ struct device *devdpc = pcie_port_find_device(pdev, PCIE_PORT_SERVICE_DPC);
+ struct pcie_device *pciedev = to_pcie_device(devdpc);
+ struct dpc_dev *dpc = get_service_data(pciedev);
+ u16 cap = dpc->cap_pos;
/*
- * Wait until the Link is inactive, then clear DPC Trigger Status
- * to allow the Port to leave DPC.
+ * DPC disables the Link automatically in hardware, so it has already
+ * been reset by the time we get here. Wait until the Link is inactive,
+ * then clear DPC Trigger Status to allow the Port to leave DPC.
*/
pcie_wait_for_link(pdev, false);
This is just a code clean up patch reording declarations based on their dependency. No functional change here. Signed-off-by: Keith Busch <keith.busch@intel.com> --- drivers/pci/pcie/dpc.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-)