From: Paul Durrant Date: Mon, 13 May 2019 15:50:46 +0000 (+0200) Subject: iommu: trivial re-organisation to avoid unnecessary test X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=99bb45e684283b3bc621dbc99b1b93c856b4dd1c;p=people%2Froyger%2Fxen.git iommu: trivial re-organisation to avoid unnecessary test 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 Acked-by: Jan Beulich --- diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index a6697d58fb..b453b32191 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -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" :