summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2007-08-02 01:41:15 +1000
committerPaul Mackerras <paulus@samba.org>2007-08-17 11:01:51 +1000
commitf774216d465959a4777ac3de67f33bf75ecd4a76 (patch)
treebdafc364944cfd8fba6529b7680c60d299a5764f
parentc05129bd8190fd702426f93f9fe0a00fa6cacb31 (diff)
downloadop-kernel-dev-f774216d465959a4777ac3de67f33bf75ecd4a76.zip
op-kernel-dev-f774216d465959a4777ac3de67f33bf75ecd4a76.tar.gz
[POWERPC] Replace a few #defines with empty inline functions
...so that GCC doesn't complain about unused variables in the callers of these. Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--include/asm-powerpc/dma-mapping.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index 744d6bb..d058916 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -249,8 +249,12 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
return virt_to_bus(ptr);
}
-/* We do nothing. */
-#define dma_unmap_single(dev, addr, size, dir) ((void)0)
+static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr,
+ size_t size,
+ enum dma_data_direction direction)
+{
+ /* We do nothing. */
+}
static inline dma_addr_t
dma_map_page(struct device *dev, struct page *page,
@@ -264,8 +268,12 @@ dma_map_page(struct device *dev, struct page *page,
return page_to_bus(page) + offset;
}
-/* We do nothing. */
-#define dma_unmap_page(dev, handle, size, dir) ((void)0)
+static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
+ size_t size,
+ enum dma_data_direction direction)
+{
+ /* We do nothing. */
+}
static inline int
dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
@@ -284,8 +292,12 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
return nents;
}
-/* We don't do anything here. */
-#define dma_unmap_sg(dev, sg, nents, dir) ((void)0)
+static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
+ int nhwentries,
+ enum dma_data_direction direction)
+{
+ /* We don't do anything here. */
+}
#endif /* CONFIG_PPC64 */
OpenPOWER on IntegriCloud