treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / arm / include / asm / dma-direct.h
blob7c3001a6a775bf93a49a7e7f09cc4e96b5b4d760
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef ASM_ARM_DMA_DIRECT_H
3 #define ASM_ARM_DMA_DIRECT_H 1
5 static inline dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr)
7 unsigned int offset = paddr & ~PAGE_MASK;
8 return pfn_to_dma(dev, __phys_to_pfn(paddr)) + offset;
11 static inline phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dev_addr)
13 unsigned int offset = dev_addr & ~PAGE_MASK;
14 return __pfn_to_phys(dma_to_pfn(dev, dev_addr)) + offset;
17 #endif /* ASM_ARM_DMA_DIRECT_H */