]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
iommu: trivial re-organisation to avoid unnecessary test
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 13 May 2019 15:50:46 +0000 (17:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 May 2019 15:50:46 +0000 (17:50 +0200)
An 'if ( !iommu_enabled )' followed by an 'if ( iommu_enabled )' with
only a printk() in between seems a little silly. Move the printk() and
use 'else' instead.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/iommu.c

index a6697d58fbb6995aecfaa1e1b0b2b405849f5314..b453b32191c4c60def814aa1961a57eb99196433 100644 (file)
@@ -512,14 +512,14 @@ int __init iommu_setup(void)
     if ( !iommu_intremap )
         iommu_intpost = 0;
 
+    printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis");
     if ( !iommu_enabled )
     {
         iommu_snoop = 0;
         iommu_hwdom_passthrough = false;
         iommu_hwdom_strict = false;
     }
-    printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis");
-    if ( iommu_enabled )
+    else
     {
         printk(" - Dom0 mode: %s\n",
                iommu_hwdom_passthrough ? "Passthrough" :