Skip to content

Commit 68c9ac1

Browse files
author
Christoph Hellwig
committed
dma-mapping: remove the mapping_error dma_map_ops method
No users left except for vmd which just forwards it. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a4abe0a commit 68c9ac1

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

drivers/pci/controller/vmd.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,6 @@ static void vmd_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
394394
vmd_dma_ops(dev)->sync_sg_for_device(to_vmd_dev(dev), sg, nents, dir);
395395
}
396396

397-
static int vmd_mapping_error(struct device *dev, dma_addr_t addr)
398-
{
399-
return vmd_dma_ops(dev)->mapping_error(to_vmd_dev(dev), addr);
400-
}
401-
402397
static int vmd_dma_supported(struct device *dev, u64 mask)
403398
{
404399
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)
446441
ASSIGN_VMD_DMA_OPS(source, dest, sync_single_for_device);
447442
ASSIGN_VMD_DMA_OPS(source, dest, sync_sg_for_cpu);
448443
ASSIGN_VMD_DMA_OPS(source, dest, sync_sg_for_device);
449-
ASSIGN_VMD_DMA_OPS(source, dest, mapping_error);
450444
ASSIGN_VMD_DMA_OPS(source, dest, dma_supported);
451445
ASSIGN_VMD_DMA_OPS(source, dest, get_required_mask);
452446
add_dma_domain(domain);

include/linux/dma-mapping.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ struct dma_map_ops {
128128
enum dma_data_direction dir);
129129
void (*cache_sync)(struct device *dev, void *vaddr, size_t size,
130130
enum dma_data_direction direction);
131-
int (*mapping_error)(struct device *dev, dma_addr_t dma_addr);
132131
int (*dma_supported)(struct device *dev, u64 mask);
133132
u64 (*get_required_mask)(struct device *dev);
134133
};
@@ -580,12 +579,8 @@ static inline void dma_free_coherent(struct device *dev, size_t size,
580579

581580
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
582581
{
583-
const struct dma_map_ops *ops = get_dma_ops(dev);
584-
585582
debug_dma_mapping_error(dev, dma_addr);
586583

587-
if (ops->mapping_error)
588-
return ops->mapping_error(dev, dma_addr);
589584
if (dma_addr == DMA_MAPPING_ERROR)
590585
return 1;
591586
return 0;

0 commit comments

Comments
 (0)