]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
xen:events: move find_unbound_irq inside CONFIG_PCI_MSI
authorIan Campbell <ian.campbell@citrix.com>
Tue, 11 Jan 2011 17:20:14 +0000 (17:20 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 3 Mar 2011 16:56:58 +0000 (11:56 -0500)
The only caller is xen_allocate_pirq_msi which is also under this
ifdef so this fixes:
    drivers/xen/events.c:377: warning: 'find_unbound_pirq' defined but not used
when CONFIG_PCI_MSI=n

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
drivers/xen/events.c

index 74681478100ae2c20442df9b4d9d7eb8df9f12c1..1ae775742325796e5eee393e4f059975f16f896c 100644 (file)
@@ -387,23 +387,6 @@ static int get_nr_hw_irqs(void)
        return ret;
 }
 
-static int find_unbound_pirq(int type)
-{
-       int rc, i;
-       struct physdev_get_free_pirq op_get_free_pirq;
-       op_get_free_pirq.type = type;
-
-       rc = HYPERVISOR_physdev_op(PHYSDEVOP_get_free_pirq, &op_get_free_pirq);
-       if (!rc)
-               return op_get_free_pirq.pirq;
-
-       for (i = 0; i < nr_irqs; i++) {
-               if (pirq_to_irq[i] < 0)
-                       return i;
-       }
-       return -1;
-}
-
 static int find_unbound_irq(void)
 {
        struct irq_data *data;
@@ -677,6 +660,23 @@ out:
 #include <linux/msi.h>
 #include "../pci/msi.h"
 
+static int find_unbound_pirq(int type)
+{
+       int rc, i;
+       struct physdev_get_free_pirq op_get_free_pirq;
+       op_get_free_pirq.type = type;
+
+       rc = HYPERVISOR_physdev_op(PHYSDEVOP_get_free_pirq, &op_get_free_pirq);
+       if (!rc)
+               return op_get_free_pirq.pirq;
+
+       for (i = 0; i < nr_irqs; i++) {
+               if (pirq_to_irq[i] < 0)
+                       return i;
+       }
+       return -1;
+}
+
 void xen_allocate_pirq_msi(char *name, int *irq, int *pirq, int alloc)
 {
        spin_lock(&irq_mapping_update_lock);