From patchwork Thu May 30 03:48:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 165389 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp413107ili; Wed, 29 May 2019 20:49:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLpVPNrmEOs+pQN3DDqDxxEVM9JIETdQpuQLH6+b5nvcpfKeo05WAEjj26kzPgstYR7erA X-Received: by 2002:a65:4c07:: with SMTP id u7mr1698817pgq.93.1559188171390; Wed, 29 May 2019 20:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559188171; cv=none; d=google.com; s=arc-20160816; b=aVgfOA5E6EQUZAvrmRpJnWZPG6aDPmcSzC1eC40B6IMizh8HdyVuzet2DHZ6zh7zBT DIMHOyjBxOhMtm3TjUNiT9PKmSwmQ428U7IXPwpw1dNwrhDazZZVP721lK3CBDhHpet9 sP3juBtFXvOpuwWXuYYk3WZel1HD74U5mc6iC+xGJSBrqtitWYv4dzNtOqHAj4ByD4a2 6qfyIohd6B02xRshP7V4wPKqPCmwGKPRukOR2wisQh2/dxyGljSXWnX9vD7SyLBu55UW E6BddkSR1p/i44C1htgD3fr4ySosU90OMn5oPBfcwzp8Mgqn7eAtexUd8ugBbRAnDuIr rVbQ== 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=EMwxPwrXT4aGD3UIdIb3MLbbOKmq83JXPzpOBcr7ePM=; b=sPtGISa9PGuP6me9os5M7L9rHSHq59bbkslYW19ig8MjDUjm1iDCOcPE2Ro84mLL4j 3BX06OO0k+ns8J2pbSlNmsoWqJm9LRC4kIXPuNpi5rRUYpEqUX4XNFCbyAY+JSUEOGw1 drV2FaitcN5ZXQRqPeBtlpilqFpdlhTv4dJxycLNOizP6sWu6NJe2T9OYg9hUj0EFP9E vYIOBmDA5szEu2mRziZLPv7rrC+wih49OAJQu0STgjbVO5Nq3S0dAnJe+CpzdkLg/jgo TCWez2aEnf3hQDKXpuo+iw3uQ6CsmRqLcikamBnIKEl6gReSbmlEipIjbfY0AE3UG2c8 YbjA== 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 q23si2157822pfh.28.2019.05.29.20.49.31; Wed, 29 May 2019 20:49:31 -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 S2387720AbfE3Dt3 (ORCPT + 30 others); Wed, 29 May 2019 23:49:29 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:18048 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387647AbfE3DtZ (ORCPT ); Wed, 29 May 2019 23:49:25 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id A67C82750DE3F619EF3C; Thu, 30 May 2019 11:49:22 +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, 30 May 2019 11:49:13 +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 , Hanjun Guo Subject: [PATCH v8 2/7] x86/dma: use IS_ENABLED() to simplify the code Date: Thu, 30 May 2019 11:48:26 +0800 Message-ID: <20190530034831.4184-3-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190530034831.4184-1-thunder.leizhen@huawei.com> References: <20190530034831.4184-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 This patch removes the ifdefs around CONFIG_IOMMU_DEFAULT_PASSTHROUGH to improve readablity. Signed-off-by: Zhen Lei --- arch/x86/kernel/pci-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 1.8.3 diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index dcd272dbd0a9330..9f2b19c35a060df 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -43,11 +43,8 @@ * 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[];