Skip to contentSkip to conversation

passthrough: fix typo

PATCH In review Qing He 1 participant 2 messages Jan 20, 2009

lore
Share & tools
lore

Qing He

author
#0 lore raw

PATCH 1/1 passthrough: fix typo

The indentation level of the following code was incidentally changed when event_lock was added to protect dpci. It causes no issue but does look a little wierd, so fix it.

---

xen/drivers/passthrough/io.c +6 -6
diff -r 8df3c145923f xen/drivers/passthrough/io.c
@@ -84,13 +84,13 @@ int pt_irq_create_bind_vtd(
         memset(hvm_irq_dpci, 0, sizeof(*hvm_irq_dpci));
         for ( int i = 0; i < NR_IRQS; i++ )
             INIT_LIST_HEAD(&hvm_irq_dpci->mirq[i].digl_list);
-    }
 
-    if ( domain_set_irq_dpci(d, hvm_irq_dpci) == 0 )
-    {
-        xfree(hvm_irq_dpci);
-        spin_unlock(&d->event_lock);
-        return -EINVAL;
+        if ( domain_set_irq_dpci(d, hvm_irq_dpci) == 0 )
+        {
+            xfree(hvm_irq_dpci);
+            spin_unlock(&d->event_lock);
+            return -EINVAL;
+        }
     }
 
     if ( pt_irq_bind->irq_type == PT_IRQ_TYPE_MSI )
author
#1 lore raw
Quoted 4 lines · Qing He

The indentation level of the following code was incidentally changed when event_lock was added to protect dpci. It causes no issue but does look a little wierd, so fix it.

sorry for missing the DCO

Quoted 29 lines

---
diff -r 8df3c145923f xen/drivers/passthrough/io.c

xen/drivers/passthrough/io.c +6 -6
@@ -84,13 +84,13 @@ int pt_irq_create_bind_vtd(
         memset(hvm_irq_dpci, 0, sizeof(*hvm_irq_dpci));
         for ( int i = 0; i < NR_IRQS; i++ )
             INIT_LIST_HEAD(&hvm_irq_dpci->mirq[i].digl_list);
-    }
 
-    if ( domain_set_irq_dpci(d, hvm_irq_dpci) == 0 )
-    {
-        xfree(hvm_irq_dpci);
-        spin_unlock(&d->event_lock);
-        return -EINVAL;
+        if ( domain_set_irq_dpci(d, hvm_irq_dpci) == 0 )
+        {
+            xfree(hvm_irq_dpci);
+            spin_unlock(&d->event_lock);
+            return -EINVAL;
+        }
     }
 
     if ( pt_irq_bind->irq_type == PT_IRQ_TYPE_MSI )

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel