Skip to content

Commit

Permalink
hw/pci/pcie: Replace PCI_DEVICE() casts with existing variable
Browse files Browse the repository at this point in the history
A little cleanup is possible because of hotplug_pdev introduction.

Signed-off-by: Julia Suvorova <jusual@redhat.com>
Message-Id: <20200427182440.92433-3-jusual@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
  • Loading branch information
jusual authored and mstsirkin committed May 4, 2020
1 parent 0501e1a commit 6a1e073
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/pci/pcie.c
Expand Up @@ -449,7 +449,7 @@ void pcie_cap_slot_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA,
PCI_EXP_LNKSTA_DLLLA);
}
pcie_cap_slot_event(PCI_DEVICE(hotplug_dev),
pcie_cap_slot_event(hotplug_pdev,
PCI_EXP_HP_EV_PDC | PCI_EXP_HP_EV_ABP);
}
}
Expand Down Expand Up @@ -490,7 +490,7 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev,
return;
}

pcie_cap_slot_plug_common(PCI_DEVICE(hotplug_dev), dev, &local_err);
pcie_cap_slot_plug_common(hotplug_pdev, dev, &local_err);
if (local_err) {
error_propagate(errp, local_err);
return;
Expand All @@ -509,7 +509,7 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev,
return;
}

pcie_cap_slot_push_attention_button(PCI_DEVICE(hotplug_dev));
pcie_cap_slot_push_attention_button(hotplug_pdev);
}

/* pci express slot for pci express root/downstream port
Expand Down

0 comments on commit 6a1e073

Please sign in to comment.