--- zzzz-none-000/linux-4.1.38/arch/arm/include/asm/dma-mapping.h 2017-01-18 18:48:06.000000000 +0000 +++ bcm63-7582-715/linux-4.1.38/arch/arm/include/asm/dma-mapping.h 2020-11-25 10:06:48.000000000 +0000 @@ -56,14 +56,14 @@ * 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) { if (dev) pfn -= dev->dma_pfn_offset; 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) { unsigned long pfn = __bus_to_pfn(addr); @@ -73,7 +73,7 @@ return pfn; } -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) { if (dev) { unsigned long pfn = dma_to_pfn(dev, addr); @@ -84,7 +84,7 @@ 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) { if (dev) return pfn_to_dma(dev, virt_to_pfn(addr)); @@ -165,29 +165,29 @@ return 1; } -static inline void dma_mark_clean(void *addr, size_t size) { } +static inline void dma_mark_clean(void *addr __maybe_unused, size_t size __maybe_unused) { } /* * DMA errors are defined by all-bits-set in the DMA address. */ -static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) +static inline int dma_mapping_error(struct device *dev __maybe_unused, dma_addr_t dma_addr) { debug_dma_mapping_error(dev, dma_addr); - return dma_addr == DMA_ERROR_CODE; + return dma_addr == (unsigned int)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) { }