diff mbox

[1/3,RESEND] kvm: qemu: remove the useless parameter

Message ID 715D42877B251141A38726ABF5CABF2C01957E5A50@pdsmsx503.ccr.corp.intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Han, Weidong Feb. 6, 2009, 8:58 a.m. UTC
should pass &assigned_dev->dev to ipf_map_irq in while loop, the
parameter PCIDevice *d is useless. And rename assign_dev_update_irq
to assigned_dev_update_irqs() because it updates irq on all assigned devices.

Signed-off-by: Weidong Han <weidong.han@intel.com>
---
 qemu/hw/device-assignment.c |    4 ++--
 qemu/hw/device-assignment.h |    2 +-
 qemu/hw/pci.c               |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Mark McLoughlin Feb. 6, 2009, 10:16 a.m. UTC | #1
On Fri, 2009-02-06 at 16:58 +0800, Han, Weidong wrote:
> should pass &assigned_dev->dev to ipf_map_irq in while loop, the
> parameter PCIDevice *d is useless. And rename assign_dev_update_irq
> to assigned_dev_update_irqs() because it updates irq on all assigned devices.
> 
> Signed-off-by: Weidong Han <weidong.han@intel.com>

Acked-by: Mark McLoughlin <markmc@redhat.com>

Cheers,
Mark.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index 3fa8053..5003611 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -488,7 +488,7 @@  static uint32_t calc_assigned_dev_id(uint8_t bus, uint8_t devfn)
 /* The pci config space got updated. Check if irq numbers have changed
  * for our devices
  */
-void assigned_dev_update_irq(PCIDevice *d)
+void assigned_dev_update_irqs()
 {
     AssignedDevInfo *adev;
 
@@ -502,7 +502,7 @@  void assigned_dev_update_irq(PCIDevice *d)
         irq = piix_get_irq(irq);
 
 #ifdef TARGET_IA64
-	irq = ipf_map_irq(d, irq);
+	irq = ipf_map_irq(&assigned_dev->dev, irq);
 #endif
 
         if (irq != assigned_dev->girq) {
diff --git a/qemu/hw/device-assignment.h b/qemu/hw/device-assignment.h
index 8b3b105..f216bb0 100644
--- a/qemu/hw/device-assignment.h
+++ b/qemu/hw/device-assignment.h
@@ -99,7 +99,7 @@  PCIDevice *init_assigned_device(AssignedDevInfo *adev, PCIBus *bus);
 AssignedDevInfo *add_assigned_device(const char *arg);
 void add_assigned_devices(PCIBus *bus, const char **devices, int n_devices);
 ram_addr_t assigned_dev_load_option_roms(ram_addr_t rom_base_offset);
-void assigned_dev_update_irq(PCIDevice *d);
+void assigned_dev_update_irqs(void);
 
 #define MAX_DEV_ASSIGN_CMDLINE 8
 
diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c
index a6d57e5..e207c7c 100644
--- a/qemu/hw/pci.c
+++ b/qemu/hw/pci.c
@@ -484,7 +484,7 @@  void pci_default_write_config(PCIDevice *d,
     if (kvm_enabled() && qemu_kvm_irqchip_in_kernel() &&
         address >= PIIX_CONFIG_IRQ_ROUTE &&
 	address < PIIX_CONFIG_IRQ_ROUTE + 4)
-        assigned_dev_update_irq(d);
+        assigned_dev_update_irqs();
 #endif /* USE_KVM_DEVICE_ASSIGNMENT */
 
     end = address + len;