--- zzzz-none-000/linux-2.6.28.10/arch/arm/include/asm/dma-mapping.h 2009-05-02 18:54:43.000000000 +0000 +++ puma5-6360-529/linux-2.6.28.10/arch/arm/include/asm/dma-mapping.h 2009-10-15 12:29:26.000000000 +0000 @@ -15,17 +15,20 @@ * must not be used by drivers. */ #ifndef __arch_page_to_dma -static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) +static inline dma_addr_t page_to_dma(struct device *dev __attribute__ ((unused)), + struct page *page) { return (dma_addr_t)__virt_to_bus((unsigned long)page_address(page)); } -static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) +static inline void *dma_to_virt(struct device *dev __attribute__ ((unused)), + dma_addr_t addr) { return (void *)__bus_to_virt(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 __attribute__ ((unused)), + void *addr) { return (dma_addr_t)__virt_to_bus((unsigned long)(addr)); } @@ -67,7 +70,7 @@ * FIXME: This should really be a platform specific issue - we should * return false if GFP_DMA allocations may not satisfy the supplied 'mask'. */ -static inline int dma_supported(struct device *dev, u64 mask) +static inline int dma_supported(struct device *dev, u64 mask __attribute__ ((unused))) { return dev->dma_mask && *dev->dma_mask != 0; } @@ -87,7 +90,8 @@ return 32; } -static inline int dma_is_consistent(struct device *dev, dma_addr_t handle) +static inline int dma_is_consistent(struct device *dev __attribute__ ((unused)), + dma_addr_t handle __attribute__ ((unused))) { return !!arch_is_coherent(); } @@ -95,23 +99,28 @@ /* * 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 __attribute__ ((unused)), + dma_addr_t dma_addr) { - return dma_addr == ~0; + return dma_addr == (dma_addr_t) ~0; } /* * 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 __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + dma_addr_t *handle __attribute__ ((unused)), + gfp_t gfp __attribute__ ((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 __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + void *cpu_addr __attribute__ ((unused)), + dma_addr_t handle __attribute__ ((unused))) { } @@ -256,14 +265,20 @@ int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction); #else -static inline int dmabounce_sync_for_cpu(struct device *d, dma_addr_t addr, - unsigned long offset, size_t size, enum dma_data_direction dir) +static inline int dmabounce_sync_for_cpu(struct device *d __attribute__ ((unused)), + dma_addr_t addr __attribute__ ((unused)), + unsigned long offset __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + enum dma_data_direction dir __attribute__ ((unused))) { return 1; } -static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr, - unsigned long offset, size_t size, enum dma_data_direction dir) +static inline int dmabounce_sync_for_device(struct device *d __attribute__ ((unused)), + dma_addr_t addr __attribute__ ((unused)), + unsigned long offset __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + enum dma_data_direction dir __attribute__ ((unused))) { return 1; } @@ -333,8 +348,10 @@ * After this call, reads by the CPU to the buffer are guaranteed to see * whatever the device wrote there. */ -static inline void dma_unmap_single(struct device *dev, dma_addr_t handle, - size_t size, enum dma_data_direction dir) +static inline void dma_unmap_single(struct device *dev __attribute__ ((unused)), + dma_addr_t handle __attribute__ ((unused)), + size_t size __attribute__ ((unused)), + enum dma_data_direction dir __attribute__ ((unused))) { /* nothing to do */ }