From patchwork Wed Nov 13 07:35:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 11241247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FE861747 for ; Wed, 13 Nov 2019 07:36:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3980D21A49 for ; Wed, 13 Nov 2019 07:36:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pcfnDrpw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3980D21A49 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YPcK64beVs7utsDmENxy0jCFzSMvZqQvcTM3FFZw6AI=; b=pcfnDrpwh00CGi vcRo98Z+VJO3myWSu+oaqI/bHAtrFlMHjxAvH2514jXxdgIdRyFfIgyZAXUJnHPMgTK4aLIrjaS6s 92QZGxN2YNGeQF6SWJ0b4/vt3LAXvOOVK81nPEX8GodvgesEMJKtp7lD+igkeHNCyms0WTewyOAeE +eIZ6dM5rWJnPC1tY6H9uBZREsAKvP+C+sff41KiufjVDfWmcDJUWftNtvhr4mueWjANS3tA8cK8i xXmCqhR+oonaT+Xmij/7JVNfSg0I4nhTklHkDKjzGicFGQ1dlnx0W0/XkmqGce9QjeZxmWe7nwRuo hh39b7aWExwXMjS61Ohg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUnCQ-0000iL-Oj; Wed, 13 Nov 2019 07:36:22 +0000 Received: from [2001:4bb8:180:3806:c70:4a89:bc61:5] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUnBt-00006y-GA; Wed, 13 Nov 2019 07:35:49 +0000 From: Christoph Hellwig To: Nicolas Saenz Julienne , iommu@lists.linux-foundation.org, Russell King Subject: [PATCH 3/3] powerpc: remove support for NULL dev in __phys_to_dma / __dma_to_phys Date: Wed, 13 Nov 2019 08:35:39 +0100 Message-Id: <20191113073539.9660-4-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191113073539.9660-1-hch@lst.de> References: <20191113073539.9660-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Support for calling the DMA API functions without a valid device pointer was removed a while ago, so remove the stale support for that from the powerpc __phys_to_dma / __dma_to_phys helpers. Signed-off-by: Christoph Hellwig Acked-by: Michael Ellerman --- arch/powerpc/include/asm/dma-direct.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/powerpc/include/asm/dma-direct.h b/arch/powerpc/include/asm/dma-direct.h index e29e8a236b8d..abc154d784b0 100644 --- a/arch/powerpc/include/asm/dma-direct.h +++ b/arch/powerpc/include/asm/dma-direct.h @@ -4,15 +4,11 @@ static inline dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr) { - if (!dev) - return paddr + PCI_DRAM_OFFSET; return paddr + dev->archdata.dma_offset; } static inline phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t daddr) { - if (!dev) - return daddr - PCI_DRAM_OFFSET; return daddr - dev->archdata.dma_offset; } #endif /* ASM_POWERPC_DMA_DIRECT_H */