Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4866877imm; Tue, 9 Oct 2018 06:29:47 -0700 (PDT) X-Google-Smtp-Source: ACcGV61YLvxp5NUmyQLvskZ0z0m/DlsEpgfYt/t+nuiyfr8Z+XLpgxhSom3MwCvQyuoCEGkIeIW9 X-Received: by 2002:a63:ca0c:: with SMTP id n12-v6mr25656215pgi.109.1539091787754; Tue, 09 Oct 2018 06:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539091787; cv=none; d=google.com; s=arc-20160816; b=M20GIIE4T0bOuwwUL2MZ1MHnI6yrxNN7rkGjmsOX3VpIMiGklDbvhVb02bzG+eNCr9 dyvDNvXT3AX5Kw2Wk/l0jO0gy9RAXBWsOfidFyHxM9BaEX5YzYwC0W/HkrDpAB7t/KXC DCnklgqOSnkDvkyKGu3VznxETkDNnSqY5u8r623cWfPcM9vYeA4hwqqchPED3dZ9uM3p RPYYK3X2R8+7oJ/7aZC1x1ynLw/uB24hBfeyNd4JOylLK00BcbSIEf8CcZT3SvWdhqcc TcTImeO7JKHXeagQUSljHcaL0Ob2S0PbUiSb0be0UQYt1x23IVnOHxJEZsxgxhm3gq3I ZEBg== 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 :dkim-signature; bh=FPvgBLtWHsWCoL0Sua1w8BYNtdVAHDwhlJY2AxROsgo=; b=zhz5+m/AvSeE35P0AA4z9C3r4hTjcMAgjBvXWZDK4vYb955R9hMSlGE3/KUHLISoab FQh/q/Lm71GaHKBH6oIt4i5UIjnXLHO9VNzi1BPb6vaBTh3/suUoBy5rw7omnq/guFdS G4BSBlmt305GknldfKWCODPgwvrlK4Z4IBjcIZKfsAMeSABCLlLk4zdoGQNYZBKOTE8y 1X1bvzihITAOJiyo2Ez/Fl73wrnt2/jUOloxrvnyqtyTZDj5nfhKqRZCQC+qELs4vPBH qjUuO4/UACETERfH6Xg//vPnTr11XYbkX7SFrYRCUoSXkiVta3Jq7YKPjXV2UZNudsqX 3AEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=L2TSSbb+; 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 s19-v6si20453360pgi.324.2018.10.09.06.29.32; Tue, 09 Oct 2018 06:29:47 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=L2TSSbb+; 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 S1727028AbeJIUpl (ORCPT + 99 others); Tue, 9 Oct 2018 16:45:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49450 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727031AbeJIUnH (ORCPT ); Tue, 9 Oct 2018 16:43:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FPvgBLtWHsWCoL0Sua1w8BYNtdVAHDwhlJY2AxROsgo=; b=L2TSSbb+lOD59zteiXYTwFQ7Ma Dw0zO+HHGGmLlMqchBHV+WbkXMLMJO/7Uy00wg+DENtwWf5uVx1VA2umOZNklgKsr997KxO4HmbAp vJS01fFgWXBkFFJWtjQuxMCPpTYV3kHMi71E5ZzLXUa4ewHl7g1nk3LTV4s0cdrzzgozaunGWeJr3 TzEqp9+1gsNa5OLDunqPjsZCc6j0iAqKJn7BAtLUSX0wXX+0FQs/ALqt+q/pJaGpwRqWRjEmbyVkm y4p2LOdeUzMtLQJDiqlj+jTgGRWfvttHeBMeN1Tff4eX1rpU4tmstM20qKALPd9WrbnL+4Fkv+XmK E4rYwf/A==; Received: from clnet-p19-102.ikbnet.co.at ([83.175.77.102] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g9s0z-0001B1-3S; Tue, 09 Oct 2018 13:25:33 +0000 From: Christoph Hellwig To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, iommu@lists.linux-foundation.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/33] powerpc/dart: remove dead cleanup code in iommu_init_early_dart Date: Tue, 9 Oct 2018 15:24:40 +0200 Message-Id: <20181009132500.17643-14-hch@lst.de> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181009132500.17643-1-hch@lst.de> References: <20181009132500.17643-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If dart_init failed we didn't have a chance to setup dma or controller ops yet, so there is no point in resetting them. Signed-off-by: Christoph Hellwig --- arch/powerpc/sysdev/dart_iommu.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 5ca3e22d0512..ce5dd2048f57 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c @@ -428,7 +428,7 @@ void __init iommu_init_early_dart(struct pci_controller_ops *controller_ops) /* Initialize the DART HW */ if (dart_init(dn) != 0) - goto bail; + return; /* Setup bypass if supported */ if (dart_is_u4) @@ -439,15 +439,6 @@ void __init iommu_init_early_dart(struct pci_controller_ops *controller_ops) /* Setup pci_dma ops */ set_pci_dma_ops(&dma_iommu_ops); - return; - - bail: - /* If init failed, use direct iommu and null setup functions */ - controller_ops->dma_dev_setup = NULL; - controller_ops->dma_bus_setup = NULL; - - /* Setup pci_dma ops */ - set_pci_dma_ops(&dma_nommu_ops); } #ifdef CONFIG_PM -- 2.19.0