linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning
@ 2008-12-04 18:12 Becky Bruce
  2008-12-04 23:43 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Becky Bruce @ 2008-12-04 18:12 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: sfr, paulus

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

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
---
 arch/powerpc/include/asm/dma-mapping.h |   41 +++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/include/asm/dma-mapping.h b/arch/powerpc/include/asm/dma-mapping.h
index 9063184..86cef7d 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -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)
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning
  2008-12-04 18:12 [PATCH] powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning Becky Bruce
@ 2008-12-04 23:43 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2008-12-04 23:43 UTC (permalink / raw)
  To: Becky Bruce; +Cc: linuxppc-dev, paulus

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

Hi Becky,

On Thu,  4 Dec 2008 12:12:40 -0600 Becky Bruce <beckyb@kernel.crashing.org> wrote:
>
> Change #define stubs of dma_sync ops to be empty static inlines
> to avoid build warning.
> 
> Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>

Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>

Build tested for ppc64_defconfig.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-04 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-04 18:12 [PATCH] powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning Becky Bruce
2008-12-04 23:43 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).