Blame SOURCES/kvm-hw-pci-pcie-Replace-PCI_DEVICE-casts-with-existing-v.patch

77c23f
From f98a1fdad0aa53337925ac46b73a3e6ad36f6295 Mon Sep 17 00:00:00 2001
77c23f
From: Julia Suvorova <jusual@redhat.com>
77c23f
Date: Mon, 4 May 2020 21:25:05 +0100
77c23f
Subject: [PATCH 2/9] hw/pci/pcie: Replace PCI_DEVICE() casts with existing
77c23f
 variable
77c23f
77c23f
RH-Author: Julia Suvorova <jusual@redhat.com>
77c23f
Message-id: <20200504212505.15977-3-jusual@redhat.com>
77c23f
Patchwork-id: 96259
77c23f
O-Subject: [RHEL-AV-8.2.1 qemu-kvm PATCH 2/2] hw/pci/pcie: Replace PCI_DEVICE() casts with existing variable
77c23f
Bugzilla: 1820531
77c23f
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
77c23f
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
77c23f
RH-Acked-by: Peter Xu <peterx@redhat.com>
77c23f
77c23f
A little cleanup is possible because of hotplug_pdev introduction.
77c23f
77c23f
Signed-off-by: Julia Suvorova <jusual@redhat.com>
77c23f
Message-Id: <20200427182440.92433-3-jusual@redhat.com>
77c23f
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
77c23f
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
77c23f
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
77c23f
(cherry picked from commit 6a1e073378353eb6ac0565e0dc649b3db76ed5dc)
77c23f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
77c23f
---
77c23f
 hw/pci/pcie.c | 6 +++---
77c23f
 1 file changed, 3 insertions(+), 3 deletions(-)
77c23f
77c23f
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
77c23f
index 6b48d04..abc99b6 100644
77c23f
--- a/hw/pci/pcie.c
77c23f
+++ b/hw/pci/pcie.c
77c23f
@@ -449,7 +449,7 @@ void pcie_cap_slot_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
77c23f
             pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA,
77c23f
                                        PCI_EXP_LNKSTA_DLLLA);
77c23f
         }
77c23f
-        pcie_cap_slot_event(PCI_DEVICE(hotplug_dev),
77c23f
+        pcie_cap_slot_event(hotplug_pdev,
77c23f
                             PCI_EXP_HP_EV_PDC | PCI_EXP_HP_EV_ABP);
77c23f
     }
77c23f
 }
77c23f
@@ -490,7 +490,7 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev,
77c23f
         return;
77c23f
     }
77c23f
 
77c23f
-    pcie_cap_slot_plug_common(PCI_DEVICE(hotplug_dev), dev, &local_err);
77c23f
+    pcie_cap_slot_plug_common(hotplug_pdev, dev, &local_err);
77c23f
     if (local_err) {
77c23f
         error_propagate(errp, local_err);
77c23f
         return;
77c23f
@@ -509,7 +509,7 @@ void pcie_cap_slot_unplug_request_cb(HotplugHandler *hotplug_dev,
77c23f
         return;
77c23f
     }
77c23f
 
77c23f
-    pcie_cap_slot_push_attention_button(PCI_DEVICE(hotplug_dev));
77c23f
+    pcie_cap_slot_push_attention_button(hotplug_pdev);
77c23f
 }
77c23f
 
77c23f
 /* pci express slot for pci express root/downstream port
77c23f
-- 
77c23f
1.8.3.1
77c23f