Patchwork [RFC,30/45] pci-assign: Rename assign_irq to assign_intx

login
register
mail settings
Submitter Jan Kiszka
Date Oct. 17, 2011, 9:28 a.m.
Message ID <cac03ddcdf7935315c957d4736828c738255c05e.1318843693.git.jan.kiszka@siemens.com>
Download mbox | patch
Permalink /patch/120138/
State New
Headers show

Comments

Jan Kiszka - Oct. 17, 2011, 9:28 a.m.
The previous name may incorrectly suggest that this function assigns all
types of IRQs though it's only dealing with legacy interrupts.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/device-assignment.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Patch

diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 799b816..4e4349b 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -807,7 +807,7 @@  static int assign_device(AssignedDevice *dev)
     return r;
 }
 
-static int assign_irq(AssignedDevice *dev)
+static int assign_intx(AssignedDevice *dev)
 {
     struct kvm_assigned_irq assigned_irq_data;
     int irq, r = 0;
@@ -829,7 +829,7 @@  static int assign_irq(AssignedDevice *dev)
         assigned_irq_data.flags = dev->irq_requested_type;
         r = kvm_deassign_irq(kvm_state, &assigned_irq_data);
         if (r) {
-            perror("assign_irq: deassign");
+            perror("assign_intx: deassign");
         }
         dev->irq_requested_type = 0;
     }
@@ -898,7 +898,7 @@  void assigned_dev_update_irqs(void)
     while (dev) {
         next = QLIST_NEXT(dev, next);
         if (dev->irq_requested_type & KVM_DEV_IRQ_HOST_INTX) {
-            r = assign_irq(dev);
+            r = assign_intx(dev);
             if (r < 0) {
                 qdev_unplug(&dev->dev.qdev);
             }
@@ -967,7 +967,7 @@  static void assigned_dev_update_msi(PCIDevice *pci_dev)
         assigned_dev->girq = -1;
         assigned_dev->irq_requested_type = assigned_irq_data.flags;
     } else {
-        assign_irq(assigned_dev);
+        assign_intx(assigned_dev);
     }
 }
 
@@ -1102,7 +1102,7 @@  static void assigned_dev_update_msix(PCIDevice *pci_dev)
         assigned_dev->girq = -1;
         assigned_dev->irq_requested_type = assigned_irq_data.flags;
     } else {
-        assign_irq(assigned_dev);
+        assign_intx(assigned_dev);
     }
 }
 
@@ -1645,8 +1645,8 @@  static int assigned_initfn(struct PCIDevice *pci_dev)
     if (r < 0)
         goto out;
 
-    /* assign irq for the device */
-    r = assign_irq(dev);
+    /* assign legacy INTx to the device */
+    r = assign_intx(dev);
     if (r < 0)
         goto assigned_out;