]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Revert "Merge branch 'stable/bug.fixes-3.2' into linux-next"
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 6 Oct 2011 14:30:46 +0000 (10:30 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 6 Oct 2011 14:30:46 +0000 (10:30 -0400)
This reverts commit a3ff69a4704245a8de1fe5c3ee9906cbabbf58e1, reversing
changes made to e59e21d4d7abe3158297f09f724b4b26dca29885.

arch/x86/pci/xen.c
arch/x86/xen/enlighten.c
arch/x86/xen/p2m.c
drivers/xen/events.c
drivers/xen/xen-pciback/pci_stub.c
drivers/xen/xenbus/xenbus_probe_backend.c

index 492ade8c978e3c632003b62e4f31ae10d36b062b..24a36fa33b6a117bf1c5bfed31623c55fac2d64e 100644 (file)
@@ -175,10 +175,8 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
                                               "pcifront-msi-x" :
                                               "pcifront-msi",
                                                DOMID_SELF);
-               if (irq < 0) {
-                       ret = irq;
+               if (irq < 0)
                        goto free;
-               }
                i++;
        }
        kfree(v);
@@ -223,10 +221,8 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
                if (msg.data != XEN_PIRQ_MSI_DATA ||
                    xen_irq_from_pirq(pirq) < 0) {
                        pirq = xen_allocate_pirq_msi(dev, msidesc);
-                       if (pirq < 0) {
-                               irq = -ENODEV;
+                       if (pirq < 0)
                                goto error;
-                       }
                        xen_msi_compose_msg(dev, pirq, &msg);
                        __write_msi_msg(msidesc, &msg);
                        dev_dbg(&dev->dev, "xen: msi bound to pirq=%d\n", pirq);
@@ -248,7 +244,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 error:
        dev_err(&dev->dev,
                "Xen PCI frontend has not registered MSI/MSI-X support!\n");
-       return irq;
+       return -ENODEV;
 }
 
 #ifdef CONFIG_XEN_DOM0
index 947386171ba53a0ff5235bf45b358d2da25d896e..2d69617950f7c94a8e14c7e5fe7ad8730aa26eeb 100644 (file)
@@ -237,7 +237,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
 
 static void __init xen_init_cpuid_mask(void)
 {
-       unsigned int ax, bx, uninitialized_var(cx), dx;
+       unsigned int ax, bx, cx, dx;
        unsigned int xsave_mask;
 
        cpuid_leaf1_edx_mask =
index c2de882cee735800afe6a4026edf5468e5dc781d..a8ee9a45c3593a4e9138e0536ec17a9d5ff65b25 100644 (file)
@@ -845,9 +845,9 @@ EXPORT_SYMBOL_GPL(m2p_find_override_pfn);
 static int p2m_dump_show(struct seq_file *m, void *v)
 {
        static const char * const level_name[] = { "top", "middle",
-                                               "entry", "abnormal", NULL};
+                                               "entry", "abnormal" };
        static const char * const type_name[] = { "identity", "missing",
-                                               "pfn", "abnormal", NULL};
+                                               "pfn", "abnormal"};
 #define TYPE_IDENTITY 0
 #define TYPE_MISSING 1
 #define TYPE_PFN 2
index 7ac4cd5a76976514778c1858a95f9f071402c575..a54fc6f2026f76fd7e060e64d6369cfec27002f8 100644 (file)
@@ -431,8 +431,7 @@ static int __must_check xen_allocate_irq_dynamic(void)
 
        irq = irq_alloc_desc_from(first, -1);
 
-       if (irq >= 0)
-               xen_irq_init(irq);
+       xen_irq_init(irq);
 
        return irq;
 }
@@ -713,7 +712,7 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
        mutex_lock(&irq_mapping_update_lock);
 
        irq = xen_allocate_irq_dynamic();
-       if (irq < 0)
+       if (irq == -1)
                goto out;
 
        irq_set_chip_and_handler_name(irq, &xen_pirq_chip, handle_edge_irq,
@@ -729,7 +728,7 @@ out:
 error_irq:
        mutex_unlock(&irq_mapping_update_lock);
        xen_free_irq(irq);
-       return ret;
+       return -1;
 }
 #endif
 
@@ -779,7 +778,7 @@ int xen_irq_from_pirq(unsigned pirq)
        mutex_lock(&irq_mapping_update_lock);
 
        list_for_each_entry(info, &xen_irq_list_head, list) {
-               if (info->type != IRQT_PIRQ)
+               if (info == NULL || info->type != IRQT_PIRQ)
                        continue;
                irq = info->irq;
                if (info->u.pirq.pirq == pirq)
@@ -1697,8 +1696,6 @@ void __init xen_init_IRQ(void)
 
        evtchn_to_irq = kcalloc(NR_EVENT_CHANNELS, sizeof(*evtchn_to_irq),
                                    GFP_KERNEL);
-       if (!evtchn_to_irq)
-               BUG();
        for (i = 0; i < NR_EVENT_CHANNELS; i++)
                evtchn_to_irq[i] = -1;
 
index e82900fb01cdc97d1b68e2ff7b5addcf7b91710e..1b474804180a230b1d943bd9be49ed6225479ccf 100644 (file)
@@ -220,8 +220,6 @@ void pcistub_put_pci_dev(struct pci_dev *dev)
        }
 
        spin_unlock_irqrestore(&pcistub_devices_lock, flags);
-       if (!found_psdev)
-               return;
 
        /*hold this lock for avoiding breaking link between
        * pcistub and xen_pcibk when AER is in processing
@@ -515,8 +513,8 @@ static void kill_domain_by_device(struct pcistub_device *psdev)
        char nodename[PCI_NODENAME_MAX];
 
        if (!psdev) {
-               printk(KERN_ERR DRV_NAME
-                       ":device is NULL when do AER recovery/kill_domain\n");
+               dev_err(&psdev->dev->dev,
+                       "device is NULL when do AER recovery/kill_domain\n");
                return;
        }
 
@@ -868,7 +866,7 @@ static inline int str_to_slot(const char *buf, int *domain, int *bus,
        if (err == 4)
                return 0;
        else if (err < 0)
-               return err;
+               return -EINVAL;
 
        /* try again without domain */
        *domain = 0;
index 331589afcfb4605a995c98137c5602c07d50d6b7..60adf919d78ddd46a4e6e2cadad27bd053bfa392 100644 (file)
@@ -103,11 +103,10 @@ static int xenbus_uevent_backend(struct device *dev,
                return -ENODEV;
 
        xdev = to_xenbus_device(dev);
+       bus = container_of(xdev->dev.bus, struct xen_bus_type, bus);
        if (xdev == NULL)
                return -ENODEV;
 
-       bus = container_of(xdev->dev.bus, struct xen_bus_type, bus);
-
        if (add_uevent_var(env, "MODALIAS=xen-backend:%s", xdev->devicetype))
                return -ENOMEM;