Commit f774216d authored by Segher Boessenkool's avatar Segher Boessenkool Committed by Paul Mackerras

[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: default avatarSegher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent c05129bd
...@@ -249,8 +249,12 @@ dma_map_single(struct device *dev, void *ptr, size_t size, ...@@ -249,8 +249,12 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
return virt_to_bus(ptr); return virt_to_bus(ptr);
} }
/* We do nothing. */ static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr,
#define dma_unmap_single(dev, addr, size, dir) ((void)0) size_t size,
enum dma_data_direction direction)
{
/* We do nothing. */
}
static inline dma_addr_t static inline dma_addr_t
dma_map_page(struct device *dev, struct page *page, dma_map_page(struct device *dev, struct page *page,
...@@ -264,8 +268,12 @@ 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; return page_to_bus(page) + offset;
} }
/* We do nothing. */ static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
#define dma_unmap_page(dev, handle, size, dir) ((void)0) size_t size,
enum dma_data_direction direction)
{
/* We do nothing. */
}
static inline int static inline int
dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, 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, ...@@ -284,8 +292,12 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
return nents; return nents;
} }
/* We don't do anything here. */ static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
#define dma_unmap_sg(dev, sg, nents, dir) ((void)0) int nhwentries,
enum dma_data_direction direction)
{
/* We don't do anything here. */
}
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment