WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH 1/2] xen: fix the error handling of msi setup

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 1/2] xen: fix the error handling of msi setup
From: Qing He <qing.he@xxxxxxxxx>
Date: 2009年8月28日 16:28:48 +0800
Cc: jeremy@xxxxxxxx, yunhong.jiang@xxxxxxxxx
Delivery-date: 2009年8月28日 01:24:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17+20080114 (2008年01月14日)
Fix the error handling of msi setup, the return value of failure
is -1, not 0.
Signed-off-by: Qing He <qing.he@xxxxxxxxx>
---
 arch/x86/xen/pci.c | 5 ++---
 drivers/xen/events.c | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c
index 60bab67..44d91ad 100644
--- a/arch/x86/xen/pci.c
+++ b/arch/x86/xen/pci.c
@@ -90,13 +90,12 @@ void __init xen_setup_pirqs(void)
 #ifdef CONFIG_PCI_MSI
 int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 {
- unsigned int irq;
- int ret;
+ int irq, ret;
 struct msi_desc *msidesc;
 
 list_for_each_entry(msidesc, &dev->msi_list, list) {
 irq = xen_create_msi_irq(dev, msidesc, type);
- if (irq == 0)
+ if (irq < 0)
 return -1;
 
 ret = set_irq_msi(irq, msidesc);
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 007b1d7..a3d430b 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -591,7 +591,7 @@ int xen_destroy_irq(int irq)
 unmap_irq.domid = DOMID_SELF;
 rc = HYPERVISOR_physdev_op(PHYSDEVOP_unmap_pirq, &unmap_irq);
 if (rc) {
- printk(KERN_WARNING "unmap irq failed %x\n", rc);
+ printk(KERN_WARNING "unmap irq failed %d\n", rc);
 goto out;
 }
 
@@ -643,7 +643,7 @@ int xen_create_msi_irq(struct pci_dev *dev, struct msi_desc 
*msidesc, int type)
 rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);
 if (rc) {
 
- printk(KERN_WARNING "xen map irq failed %x\n", rc);
+ printk(KERN_WARNING "xen map irq failed %d\n", rc);
 
 dynamic_irq_cleanup(irq);
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-ia64-devel] [IA64] Weekly benchmark results [2009ww34] , KUWAMURA Shin'ya
Next by Date: [Xen-devel] [PATCH 2/2] xen: decouple irq and pirq for MSI , Qing He
Previous by Thread: [Xen-ia64-devel] [IA64] Weekly benchmark results [2009ww34] , KUWAMURA Shin'ya
Next by Thread: [Xen-devel] [PATCH 2/2] xen: decouple irq and pirq for MSI , Qing He
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /