Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935155AbcLPN3X (ORCPT ); Fri, 16 Dec 2016 08:29:23 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:38190 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757658AbcLPN3I (ORCPT ); Fri, 16 Dec 2016 08:29:08 -0500 From: Geert Uytterhoeven To: Konrad Rzeszutek Wilk Cc: Jonathan Corbet , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Boris Ostrovsky , David Vrabel , Juergen Gross , Steven Rostedt , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2 1/3] x86, swiotlb: Simplify pci_swiotlb_detect_override() Date: Fri, 16 Dec 2016 14:28:40 +0100 Message-Id: <1481894922-28828-2-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1481894922-28828-1-git-send-email-geert+renesas@glider.be> References: <1481894922-28828-1-git-send-email-geert+renesas@glider.be> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 879 Lines: 32 At the end of the function, the local variable use_swiotlb has always the same value as the global variable swiotlb. Hence drop the local variable completely. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- arch/x86/kernel/pci-swiotlb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c index b47edb8f52566e22..36049af2715ebd13 100644 --- a/arch/x86/kernel/pci-swiotlb.c +++ b/arch/x86/kernel/pci-swiotlb.c @@ -68,12 +68,10 @@ void x86_swiotlb_free_coherent(struct device *dev, size_t size, */ int __init pci_swiotlb_detect_override(void) { - int use_swiotlb = swiotlb | swiotlb_force; - if (swiotlb_force) swiotlb = 1; - return use_swiotlb; + return swiotlb; } IOMMU_INIT_FINISH(pci_swiotlb_detect_override, pci_xen_swiotlb_detect, -- 1.9.1