Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a13f66043cd755fc7e19f8e0fbb5bfcdf470e74
Commit:     6a13f66043cd755fc7e19f8e0fbb5bfcdf470e74
Parent:     d0a23398eeaa374eb0c0435c5a259ffde77c8af0
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 30 13:24:00 2007 +0000
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Jan 30 08:39:21 2007 -0800

    [PATCH] dma-mapping.h stubs fix
    
    do { } while(0) is not a good imitation of function returning void;
    use ((void)0) instead.
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/asm-alpha/dma-mapping.h   |    6 +++---
 include/asm-powerpc/dma-mapping.h |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/asm-alpha/dma-mapping.h b/include/asm-alpha/dma-mapping.h
index 1919d72..75a1aff 100644
--- a/include/asm-alpha/dma-mapping.h
+++ b/include/asm-alpha/dma-mapping.h
@@ -41,9 +41,9 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, 
int nents,
 #define dma_map_single(dev, va, size, dir)     virt_to_phys(va)
 #define dma_map_page(dev, page, off, size, dir)        (page_to_pa(page) + off)
 
-#define dma_unmap_single(dev, addr, size, dir) do { } while (0)
-#define dma_unmap_page(dev, addr, size, dir)   do { } while (0)
-#define dma_unmap_sg(dev, sg, nents, dir)      do { } while (0)
+#define dma_unmap_single(dev, addr, size, dir) ((void)0)
+#define dma_unmap_page(dev, addr, size, dir)   ((void)0)
+#define dma_unmap_sg(dev, sg, nents, dir)      ((void)0)
 
 #define dma_mapping_error(addr)  (0)
 
diff --git a/include/asm-powerpc/dma-mapping.h 
b/include/asm-powerpc/dma-mapping.h
index 7c7de87..a19a6f1 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -37,9 +37,9 @@ extern void __dma_sync_page(struct page *page, unsigned long 
offset,
  */
 
 #define __dma_alloc_coherent(gfp, size, handle)        NULL
-#define __dma_free_coherent(size, addr)                do { } while (0)
-#define __dma_sync(addr, size, rw)             do { } while (0)
-#define __dma_sync_page(pg, off, sz, rw)       do { } while (0)
+#define __dma_free_coherent(size, addr)                ((void)0)
+#define __dma_sync(addr, size, rw)             ((void)0)
+#define __dma_sync_page(pg, off, sz, rw)       ((void)0)
 
 #endif /* ! CONFIG_NOT_COHERENT_CACHE */
 
@@ -251,7 +251,7 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
 }
 
 /* We do nothing. */
-#define dma_unmap_single(dev, addr, size, dir) do { } while (0)
+#define dma_unmap_single(dev, addr, size, dir) ((void)0)
 
 static inline dma_addr_t
 dma_map_page(struct device *dev, struct page *page,
@@ -266,7 +266,7 @@ dma_map_page(struct device *dev, struct page *page,
 }
 
 /* We do nothing. */
-#define dma_unmap_page(dev, handle, size, dir) do { } while (0)
+#define dma_unmap_page(dev, handle, size, dir) ((void)0)
 
 static inline int
 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
@@ -286,7 +286,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int 
nents,
 }
 
 /* We don't do anything here. */
-#define dma_unmap_sg(dev, sg, nents, dir)      do { } while (0)
+#define dma_unmap_sg(dev, sg, nents, dir)      ((void)0)
 
 #endif /* CONFIG_PPC64 */
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to