Skip to contentSkip to conversation

powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning

PATCH In review Becky Bruce 2 participants 2 messages Dec 4, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning

Change #define stubs of dma_sync ops to be empty static inlines to avoid build warning.

---
 arch/powerpc/include/asm/dma-mapping.h |   41 +++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 6 deletions(-)
arch/powerpc/include/asm/dma-mapping.h +35 -6
index 9063184..86cef7d 100644
@@ -363,12 +363,41 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
 					      size, direction);
 }
 #else /* CONFIG_PPC_NEED_DMA_SYNC_OPS */
-#define dma_sync_single_for_cpu(d, h, s, dir) ((void)0)
-#define dma_sync_single_for_device(d, h, s, dir) ((void)0)
-#define dma_sync_single_range_for_cpu(d, h, o, s, dir) ((void)0)
-#define dma_sync_single_range_for_device(d, h, o, s, dir) ((void)0)
-#define dma_sync_sg_for_cpu(d, s, n, dir) ((void)0)
-#define dma_sync_sg_for_device(d, s, n, dir) ((void)0)
+static inline void dma_sync_single_for_cpu(struct device *dev,
+		dma_addr_t dma_handle, size_t size,
+		enum dma_data_direction direction)
+{
+}
+
+static inline void dma_sync_single_for_device(struct device *dev,
+		dma_addr_t dma_handle, size_t size,
+		enum dma_data_direction direction)
+{
+}
+
+static inline void dma_sync_sg_for_cpu(struct device *dev,
+		struct scatterlist *sgl, int nents,
+		enum dma_data_direction direction)
+{
+}
+
+static inline void dma_sync_sg_for_device(struct device *dev,
+		struct scatterlist *sgl, int nents,
+		enum dma_data_direction direction)
+{
+}
+
+static inline void dma_sync_single_range_for_cpu(struct device *dev,
+		dma_addr_t dma_handle, unsigned long offset, size_t size,
+		enum dma_data_direction direction)
+{
+}
+
+static inline void dma_sync_single_range_for_device(struct device *dev,
+		dma_addr_t dma_handle, unsigned long offset, size_t size,
+		enum dma_data_direction direction)
+{
+}
 #endif
 
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
Signature · 1 line
1.5.6.5