From nobody Thu Apr 25 04:41:22 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1557321930; cv=none; d=zoho.com; s=zohoarc; b=Or0pO283uv5qhwbtu8DIWYrPsStnAeQITQKEM2i8fFgVG+4uUFD/XBBhuE+bP0OsHy4jlCMGPysM21FY+7W9M+nyOnr9JAfu0yE3zjulCkndAIy1oGuMlGv62oy7ZbAZynlUefS17GXElty++fQxGbUq1QJ6wescLSCv6hNvDyk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557321930; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=6+BDybf+RJtTxGMzHG4+YA7QuLB1k7xlR+Bs6JoQM1w=; b=bL9OM0gkorlZUlWflx0r5z7VX/0tY4uHoJYwu2rVuJsEE4h5sN7NT1cM0F4GLUzZ8cg7dajOc/IWr9n+tRTC+6DdZZtxu6gDGoDpkbnRDZ7RjgSKU8/xj5MlUxduo8UFh+mfI7colzoJ9THbKh/FXZEB/GY0UZJ/vLmr4lN7/r8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1557321930102915.0102370925359; Wed, 8 May 2019 06:25:30 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hOMYP-0000dE-BW; Wed, 08 May 2019 13:24:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hOMYO-0000d9-8W for xen-devel@lists.xenproject.org; Wed, 08 May 2019 13:24:12 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8f0ecd8a-7194-11e9-afcc-479c29bd2a1d; Wed, 08 May 2019 13:24:08 +0000 (UTC) X-Inumbo-ID: 8f0ecd8a-7194-11e9-afcc-479c29bd2a1d X-IronPort-AV: E=Sophos;i="5.60,446,1549929600"; d="scan'208";a="85265424" From: Paul Durrant To: Date: Wed, 8 May 2019 14:23:59 +0100 Message-ID: <20190508132403.1454-2-paul.durrant@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190508132403.1454-1-paul.durrant@citrix.com> References: <20190508132403.1454-1-paul.durrant@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 1/5] iommu: trivial re-organisation to avoid unnecessary test X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Paul Durrant , Jan Beulich Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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 --- Cc: 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/iomm= u.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 =3D 0; =20 + printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis"); if ( !iommu_enabled ) { iommu_snoop =3D 0; iommu_hwdom_passthrough =3D false; iommu_hwdom_strict =3D false; } - printk("I/O virtualisation %sabled\n", iommu_enabled ? "en" : "dis"); - if ( iommu_enabled ) + else { printk(" - Dom0 mode: %s\n", iommu_hwdom_passthrough ? "Passthrough" : --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel