--- zzzz-none-000/linux-3.10.107/arch/arm/include/asm/dma-mapping.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/arm/include/asm/dma-mapping.h 2021-11-10 11:53:52.000000000 +0000 @@ -45,22 +45,26 @@ * addresses. They must not be used by drivers. */ #ifndef __arch_pfn_to_dma -static inline dma_addr_t pfn_to_dma(struct device *dev, unsigned long pfn) +static inline dma_addr_t pfn_to_dma(struct device *dev __maybe_unused, + unsigned long pfn) { return (dma_addr_t)__pfn_to_bus(pfn); } -static inline unsigned long dma_to_pfn(struct device *dev, dma_addr_t addr) +static inline unsigned long dma_to_pfn(struct device *dev __maybe_unused, + dma_addr_t addr) { return __bus_to_pfn(addr); } -static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) +static inline void *dma_to_virt(struct device *dev __maybe_unused, + dma_addr_t addr) { return (void *)__bus_to_virt((unsigned long)addr); } -static inline dma_addr_t virt_to_dma(struct device *dev, void *addr) +static inline dma_addr_t virt_to_dma(struct device *dev __maybe_unused, + void *addr) { return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); } @@ -92,21 +96,25 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) { debug_dma_mapping_error(dev, dma_addr); - return dma_addr == DMA_ERROR_CODE; + return dma_addr == (dma_addr_t)DMA_ERROR_CODE; } /* * Dummy noncoherent implementation. We don't provide a dma_cache_sync * function so drivers using this API are highlighted with build warnings. */ -static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, - dma_addr_t *handle, gfp_t gfp) +static inline void *dma_alloc_noncoherent(struct device *dev __maybe_unused, + size_t size __maybe_unused, + dma_addr_t * handle __maybe_unused, + gfp_t gfp __maybe_unused) { return NULL; } -static inline void dma_free_noncoherent(struct device *dev, size_t size, - void *cpu_addr, dma_addr_t handle) +static inline void dma_free_noncoherent(struct device *dev __maybe_unused, + size_t size __maybe_unused, + void *cpu_addr __maybe_unused, + dma_addr_t handle __maybe_unused) { }