diff options
| -rw-r--r-- | drivers/xen/events.c | 4 | ||||
| -rw-r--r-- | drivers/xen/xen-pciback/pciback_ops.c | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 0be4df39e953..74d77dfa5f63 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
| @@ -840,7 +840,7 @@ int bind_evtchn_to_irq(unsigned int evtchn) | |||
| 840 | 840 | ||
| 841 | if (irq == -1) { | 841 | if (irq == -1) { |
| 842 | irq = xen_allocate_irq_dynamic(); | 842 | irq = xen_allocate_irq_dynamic(); |
| 843 | if (irq == -1) | 843 | if (irq < 0) |
| 844 | goto out; | 844 | goto out; |
| 845 | 845 | ||
| 846 | irq_set_chip_and_handler_name(irq, &xen_dynamic_chip, | 846 | irq_set_chip_and_handler_name(irq, &xen_dynamic_chip, |
| @@ -944,7 +944,7 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu) | |||
| 944 | 944 | ||
| 945 | if (irq == -1) { | 945 | if (irq == -1) { |
| 946 | irq = xen_allocate_irq_dynamic(); | 946 | irq = xen_allocate_irq_dynamic(); |
| 947 | if (irq == -1) | 947 | if (irq < 0) |
| 948 | goto out; | 948 | goto out; |
| 949 | 949 | ||
| 950 | irq_set_chip_and_handler_name(irq, &xen_percpu_chip, | 950 | irq_set_chip_and_handler_name(irq, &xen_percpu_chip, |
diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c index 97f5d264c31e..37c1f825f513 100644 --- a/drivers/xen/xen-pciback/pciback_ops.c +++ b/drivers/xen/xen-pciback/pciback_ops.c | |||
| @@ -135,7 +135,6 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev, | |||
| 135 | struct pci_dev *dev, struct xen_pci_op *op) | 135 | struct pci_dev *dev, struct xen_pci_op *op) |
| 136 | { | 136 | { |
| 137 | struct xen_pcibk_dev_data *dev_data; | 137 | struct xen_pcibk_dev_data *dev_data; |
| 138 | int otherend = pdev->xdev->otherend_id; | ||
| 139 | int status; | 138 | int status; |
| 140 | 139 | ||
| 141 | if (unlikely(verbose_request)) | 140 | if (unlikely(verbose_request)) |
| @@ -144,8 +143,9 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev, | |||
| 144 | status = pci_enable_msi(dev); | 143 | status = pci_enable_msi(dev); |
| 145 | 144 | ||
| 146 | if (status) { | 145 | if (status) { |
| 147 | printk(KERN_ERR "error enable msi for guest %x status %x\n", | 146 | pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err %d\n", |
| 148 | otherend, status); | 147 | pci_name(dev), pdev->xdev->otherend_id, |
| 148 | status); | ||
| 149 | op->value = 0; | 149 | op->value = 0; |
| 150 | return XEN_PCI_ERR_op_failed; | 150 | return XEN_PCI_ERR_op_failed; |
| 151 | } | 151 | } |
| @@ -223,10 +223,10 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev, | |||
| 223 | pci_name(dev), i, | 223 | pci_name(dev), i, |
| 224 | op->msix_entries[i].vector); | 224 | op->msix_entries[i].vector); |
| 225 | } | 225 | } |
| 226 | } else { | 226 | } else |
| 227 | printk(KERN_WARNING DRV_NAME ": %s: failed to enable MSI-X: err %d!\n", | 227 | pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI-X for guest %u: err %d!\n", |
| 228 | pci_name(dev), result); | 228 | pci_name(dev), pdev->xdev->otherend_id, |
| 229 | } | 229 | result); |
| 230 | kfree(entries); | 230 | kfree(entries); |
| 231 | 231 | ||
| 232 | op->value = result; | 232 | op->value = result; |
