From patchwork Thu Jun 13 08:42:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 166710 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp948409ilk; Thu, 13 Jun 2019 09:11:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8d9MdMFFmRbYI7pNFSModZmRyCCLZohana4BdAhE8F4r981xJmpxpXqieyTXBWl9K7MYR X-Received: by 2002:aa7:8143:: with SMTP id d3mr91239662pfn.143.1560442312600; Thu, 13 Jun 2019 09:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560442312; cv=none; d=google.com; s=arc-20160816; b=xU5jINxitwazgrCEVgv0JwKYDGGvhAqgrDntE85RZasjnP0YwVNCHpxZ37t/AoRk/K 0+HD4xQAlSKLpSlqkE1IePTp6uSr7itpsCGVIbMzFtn7oyElMnN13Q91RudxALtAWxlk rBNgFxNKoigAqHB7an9hhAIzA6dX6nEXnnRRAPyHe1SS7dqHGdn3rg0rttwSsBSl7UJ4 bEbWuq+a0zOEd6Mv0v6LxK6/ygNM2JIh/39pCpXqVoh+MhO/mnR7gqYVNDd9hIpGwykx tMgpN9yh9lkFVJtDMTVbAneqpJSgAgm/ybj/EqRP4qC4VpGfXLHyd/XBLRt5QNSANaV5 sIHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wUygpQT8wkUwO8S9KieDXOaLQc4reo793+TryE66Le8=; b=tO2KKmloN2H/kv7SAB5fbDNeRe2HpzJ1eV9iDMTqrdNBnfgLVQzeEwswSxFALdoIlB CcbpFUOoWSRx57FM6a0uCe+1gkqt8V2SVqIfFIPjWBgwNYs2xgXH08Pgz8b9AQG/UI47 /2Mulwo3qwKqopKupEfu9xK5t81Bsb6doAdxSdwpJ+clakJrDYQfkDQD483ziBUQ0Slw Fd3GRJrqs5iZ0hG+Yw3EzZwqgAxdftS4XcTgJXtrkJ+PA/6mKG48QQPTW5salzLxtKfY gbExGtCnnW8Vm+1sjFtJdn4g3l7n6ZpZVFQLILUOQahSED/CrZEzJKZKCV+iayDu6qUE 38IQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w67si26744pfb.125.2019.06.13.09.11.50; Thu, 13 Jun 2019 09:11:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388672AbfFMQLV (ORCPT + 24 others); Thu, 13 Jun 2019 12:11:21 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:47966 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731236AbfFMInd (ORCPT ); Thu, 13 Jun 2019 04:43:33 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id C3A82CF1F307867B8BE6; Thu, 13 Jun 2019 16:43:30 +0800 (CST) Received: from HGHY4L002753561.china.huawei.com (10.133.215.186) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Thu, 13 Jun 2019 16:43:20 +0800 From: Zhen Lei To: Jean-Philippe Brucker , John Garry , Robin Murphy , Will Deacon , Joerg Roedel , Jonathan Corbet , linux-doc , Sebastian Ott , Gerald Schaefer , "Martin Schwidefsky" , Heiko Carstens , Benjamin Herrenschmidt , Paul Mackerras , "Michael Ellerman" , Tony Luck , Fenghua Yu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , David Woodhouse , iommu , linux-kernel , linux-s390 , linuxppc-dev , x86 , linux-ia64 CC: Zhen Lei Subject: [PATCH v9 2/7] x86/dma: use IS_ENABLED() to simplify the code Date: Thu, 13 Jun 2019 16:42:35 +0800 Message-ID: <20190613084240.16768-3-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190613084240.16768-1-thunder.leizhen@huawei.com> References: <20190613084240.16768-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.133.215.186] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the ifdefs around CONFIG_IOMMU_DEFAULT_PASSTHROUGH to improve readablity. Signed-off-by: Zhen Lei --- arch/x86/kernel/pci-dma.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 1.8.3 diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index dcd272dbd0a9330..8c82b2e28a0fe2d 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -43,11 +43,7 @@ * It is also possible to disable by default in kernel config, and enable with * iommu=nopt at boot time. */ -#ifdef CONFIG_IOMMU_DEFAULT_PASSTHROUGH -int iommu_pass_through __read_mostly = 1; -#else -int iommu_pass_through __read_mostly; -#endif +int iommu_pass_through __read_mostly = IS_ENABLED(CONFIG_IOMMU_DEFAULT_PASSTHROUGH); extern struct iommu_table_entry __iommu_table[], __iommu_table_end[];