From: Julia Suvorova <jusual@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Igor Mammedov" <imammedo@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Julia Suvorova" <jusual@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH v2 2/2] hw/pci/pcie: Replace PCI_DEVICE() casts with existing variable
Date: Mon, 27 Apr 2020 20:24:40 +0200 [thread overview]
Message-ID: <20200427182440.92433-3-jusual@redhat.com> (raw)
In-Reply-To: <20200427182440.92433-1-jusual@redhat.com>
A little cleanup is possible because of hotplug_pdev introduction.
Signed-off-by: Julia Suvorova <jusual@redhat.com>
---
hw/pci/pcie.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 6b48d04d2c..abc99b6eff 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -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);
}
}
@@ -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;
@@ -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
--
2.25.3
next prev parent reply other threads:[~2020-04-27 18:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 18:24 [PATCH v2 0/2] hw/pci/pcie: Forbid hot-plug if it's disabled on the slot Julia Suvorova
2020-04-27 18:24 ` [PATCH v2 1/2] " Julia Suvorova
2020-05-03 7:46 ` Marcel Apfelbaum
2020-04-27 18:24 ` Julia Suvorova [this message]
2020-05-03 7:47 ` [PATCH v2 2/2] hw/pci/pcie: Replace PCI_DEVICE() casts with existing variable Marcel Apfelbaum
2020-04-27 20:10 ` [PATCH v2 0/2] hw/pci/pcie: Forbid hot-plug if it's disabled on the slot no-reply
2020-04-28 18:10 ` Julia Suvorova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200427182440.92433-3-jusual@redhat.com \
--to=jusual@redhat.com \
--cc=berrange@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).