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 <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Paul Durrant authored and Jan Beulich committed 2019-05-13 17:50:46 +02:00
1 parent f3694f3acb
commit 99bb45e684
1 file changed
+2 -2
+2 -2
View 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" :
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.