linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: iommu@lists.linux-foundation.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jon Mason <jdmason@kudzu.us>, Joerg Roedel <joro@8bytes.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Robin Murphy <robin.murphy@arm.com>,
	x86@kernel.org, linux-alpha@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org,
	linux-parisc@vger.kernel.org, xen-devel@lists.xenproject.org,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 22/23] dma-mapping: remove the mapping_error dma_map_ops method
Date: Fri, 30 Nov 2018 14:22:30 +0100	[thread overview]
Message-ID: <20181130132231.16512-23-hch@lst.de> (raw)
In-Reply-To: <20181130132231.16512-1-hch@lst.de>

No users left except for vmd which just forwards it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/pci/controller/vmd.c | 6 ------
 include/linux/dma-mapping.h  | 7 -------
 2 files changed, 13 deletions(-)

diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index e50b0b5815ff..98ce79eac128 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -394,11 +394,6 @@ static void vmd_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
 	vmd_dma_ops(dev)->sync_sg_for_device(to_vmd_dev(dev), sg, nents, dir);
 }
 
-static int vmd_mapping_error(struct device *dev, dma_addr_t addr)
-{
-	return vmd_dma_ops(dev)->mapping_error(to_vmd_dev(dev), addr);
-}
-
 static int vmd_dma_supported(struct device *dev, u64 mask)
 {
 	return vmd_dma_ops(dev)->dma_supported(to_vmd_dev(dev), mask);
@@ -446,7 +441,6 @@ static void vmd_setup_dma_ops(struct vmd_dev *vmd)
 	ASSIGN_VMD_DMA_OPS(source, dest, sync_single_for_device);
 	ASSIGN_VMD_DMA_OPS(source, dest, sync_sg_for_cpu);
 	ASSIGN_VMD_DMA_OPS(source, dest, sync_sg_for_device);
-	ASSIGN_VMD_DMA_OPS(source, dest, mapping_error);
 	ASSIGN_VMD_DMA_OPS(source, dest, dma_supported);
 	ASSIGN_VMD_DMA_OPS(source, dest, get_required_mask);
 	add_dma_domain(domain);
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 46bd612d929e..2adef56c6069 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -128,7 +128,6 @@ struct dma_map_ops {
 				   enum dma_data_direction dir);
 	void (*cache_sync)(struct device *dev, void *vaddr, size_t size,
 			enum dma_data_direction direction);
-	int (*mapping_error)(struct device *dev, dma_addr_t dma_addr);
 	int (*dma_supported)(struct device *dev, u64 mask);
 	u64 (*get_required_mask)(struct device *dev);
 };
@@ -575,15 +574,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
 
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 {
-	const struct dma_map_ops *ops = get_dma_ops(dev);
-
 	debug_dma_mapping_error(dev, dma_addr);
-
 	if (dma_addr == DMA_MAPPING_ERROR)
 		return 1;
-
-	if (ops->mapping_error)
-		return ops->mapping_error(dev, dma_addr);
 	return 0;
 }
 
-- 
2.19.1


  parent reply	other threads:[~2018-11-30 13:24 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-30 13:22 remove the ->mapping_error method from dma_map_ops V3 Christoph Hellwig
2018-11-30 13:22 ` [PATCH 01/23] dma-mapping: provide a generic DMA_MAPPING_ERROR Christoph Hellwig
2018-12-04 16:41   ` Robin Murphy
2018-12-04 22:33     ` Christoph Hellwig
2018-11-30 13:22 ` [PATCH 02/23] dma-direct: remove the mapping_error dma_map_ops method Christoph Hellwig
2018-11-30 13:22 ` [PATCH 03/23] arm: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 04/23] powerpc/iommu: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 05/23] mips/jazz: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 06/23] s390: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 07/23] sparc: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 08/23] parisc/ccio: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 09/23] parisc/sba_iommu: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 10/23] arm64: remove the dummy_dma_ops mapping_error method Christoph Hellwig
2018-11-30 13:22 ` [PATCH 11/23] alpha: remove the mapping_error dma_map_ops method Christoph Hellwig
2018-11-30 13:22 ` [PATCH 12/23] ia64/sba_iommu: improve internal map_page users Christoph Hellwig
2018-11-30 13:22 ` [PATCH 13/23] ia64/sba_iommu: remove the mapping_error dma_map_ops method Christoph Hellwig
2018-11-30 13:22 ` [PATCH 14/23] ia64/sn: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 15/23] x86/amd_gart: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 16/23] x86/calgary: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 17/23] iommu: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 18/23] iommu/intel: small map_page cleanup Christoph Hellwig
2018-11-30 13:22 ` [PATCH 19/23] iommu/vt-d: remove the mapping_error dma_map_ops method Christoph Hellwig
2018-11-30 13:22 ` [PATCH 20/23] iommu/dma-iommu: " Christoph Hellwig
2018-11-30 13:22 ` [PATCH 21/23] xen-swiotlb: " Christoph Hellwig
2018-12-02 12:42   ` Konrad Rzeszutek Wilk
2018-11-30 13:22 ` Christoph Hellwig [this message]
2018-11-30 13:22 ` [PATCH 23/23] dma-mapping: return an error code from dma_mapping_error Christoph Hellwig
2018-11-30 18:59 ` remove the ->mapping_error method from dma_map_ops V3 Russell King - ARM Linux
2018-11-30 19:43 ` Linus Torvalds
2018-12-03 17:27 ` Christoph Hellwig
2018-12-06 14:57 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181130132231.16512-23-hch@lst.de \
    --to=hch@lst.de \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jdmason@kudzu.us \
    --cc=joro@8bytes.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).