From 99bb45e684283b3bc621dbc99b1b93c856b4dd1c Mon Sep 17 00:00:00 2001 From: Paul Durrant Date: Mon, 13 May 2019 17:50:46 +0200 Subject: [PATCH] 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 --- xen/drivers/passthrough/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" : -- 2.30.2