From patchwork Fri Dec 16 13:28:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9477895 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1492D60828 for ; Fri, 16 Dec 2016 13:29:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05A432888D for ; Fri, 16 Dec 2016 13:29:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE0AB28897; Fri, 16 Dec 2016 13:29:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0994228896 for ; Fri, 16 Dec 2016 13:29:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934757AbcLPN3L (ORCPT ); Fri, 16 Dec 2016 08:29:11 -0500 Received: from albert.telenet-ops.be ([195.130.137.90]:38188 "EHLO albert.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757632AbcLPN3I (ORCPT ); Fri, 16 Dec 2016 08:29:08 -0500 Received: from ayla.of.borg ([84.193.137.253]) by albert.telenet-ops.be with bizsmtp id LdUg1u00J5UCtCs06dUgWM; Fri, 16 Dec 2016 14:28:49 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1cHsYy-0000gi-DO; Fri, 16 Dec 2016 14:28:40 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1cHsZ6-0007Vs-5r; Fri, 16 Dec 2016 14:28:48 +0100 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-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,