dma-mapping: remove unnecessary sync_single_range_* in dma_map_ops
sync_single_range_for_cpu and sync_single_range_for_device hooks are unnecessary because sync_single_for_cpu and sync_single_for_device can be used instead. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
					parent
					
						
							
								38388301b7
							
						
					
				
			
			
				commit
				
					
						5fd75a7850
					
				
			
		
					 2 changed files with 2 additions and 28 deletions
				
			
		| 
						 | 
					@ -123,15 +123,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
 | 
				
			||||||
						 size_t size,
 | 
											 size_t size,
 | 
				
			||||||
						 enum dma_data_direction dir)
 | 
											 enum dma_data_direction dir)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct dma_map_ops *ops = get_dma_ops(dev);
 | 
						dma_sync_single_for_cpu(dev, addr + offset, size, dir);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	BUG_ON(!valid_dma_direction(dir));
 | 
					 | 
				
			||||||
	if (ops->sync_single_range_for_cpu) {
 | 
					 | 
				
			||||||
		ops->sync_single_range_for_cpu(dev, addr, offset, size, dir);
 | 
					 | 
				
			||||||
		debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	} else
 | 
					 | 
				
			||||||
		dma_sync_single_for_cpu(dev, addr + offset, size, dir);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void dma_sync_single_range_for_device(struct device *dev,
 | 
					static inline void dma_sync_single_range_for_device(struct device *dev,
 | 
				
			||||||
| 
						 | 
					@ -140,15 +132,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
 | 
				
			||||||
						    size_t size,
 | 
											    size_t size,
 | 
				
			||||||
						    enum dma_data_direction dir)
 | 
											    enum dma_data_direction dir)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct dma_map_ops *ops = get_dma_ops(dev);
 | 
						dma_sync_single_for_device(dev, addr + offset, size, dir);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	BUG_ON(!valid_dma_direction(dir));
 | 
					 | 
				
			||||||
	if (ops->sync_single_range_for_device) {
 | 
					 | 
				
			||||||
		ops->sync_single_range_for_device(dev, addr, offset, size, dir);
 | 
					 | 
				
			||||||
		debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	} else
 | 
					 | 
				
			||||||
		dma_sync_single_for_device(dev, addr + offset, size, dir);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline void
 | 
					static inline void
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,16 +40,6 @@ struct dma_map_ops {
 | 
				
			||||||
	void (*sync_single_for_device)(struct device *dev,
 | 
						void (*sync_single_for_device)(struct device *dev,
 | 
				
			||||||
				       dma_addr_t dma_handle, size_t size,
 | 
									       dma_addr_t dma_handle, size_t size,
 | 
				
			||||||
				       enum dma_data_direction dir);
 | 
									       enum dma_data_direction dir);
 | 
				
			||||||
	void (*sync_single_range_for_cpu)(struct device *dev,
 | 
					 | 
				
			||||||
					  dma_addr_t dma_handle,
 | 
					 | 
				
			||||||
					  unsigned long offset,
 | 
					 | 
				
			||||||
					  size_t size,
 | 
					 | 
				
			||||||
					  enum dma_data_direction dir);
 | 
					 | 
				
			||||||
	void (*sync_single_range_for_device)(struct device *dev,
 | 
					 | 
				
			||||||
					     dma_addr_t dma_handle,
 | 
					 | 
				
			||||||
					     unsigned long offset,
 | 
					 | 
				
			||||||
					     size_t size,
 | 
					 | 
				
			||||||
					     enum dma_data_direction dir);
 | 
					 | 
				
			||||||
	void (*sync_sg_for_cpu)(struct device *dev,
 | 
						void (*sync_sg_for_cpu)(struct device *dev,
 | 
				
			||||||
				struct scatterlist *sg, int nents,
 | 
									struct scatterlist *sg, int nents,
 | 
				
			||||||
				enum dma_data_direction dir);
 | 
									enum dma_data_direction dir);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue