diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-01-30 08:24:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 11:39:21 -0500 |
commit | 6a13f66043cd755fc7e19f8e0fbb5bfcdf470e74 (patch) | |
tree | 301db0c7aa84e1649935fe3c842c75c9a40a67cf | |
parent | d0a23398eeaa374eb0c0435c5a259ffde77c8af0 (diff) |
[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 <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/asm-alpha/dma-mapping.h | 6 | ||||
-rw-r--r-- | 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 1919d72f4c7a..75a1aff5b57b 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, | |||
41 | #define dma_map_single(dev, va, size, dir) virt_to_phys(va) | 41 | #define dma_map_single(dev, va, size, dir) virt_to_phys(va) |
42 | #define dma_map_page(dev, page, off, size, dir) (page_to_pa(page) + off) | 42 | #define dma_map_page(dev, page, off, size, dir) (page_to_pa(page) + off) |
43 | 43 | ||
44 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 44 | #define dma_unmap_single(dev, addr, size, dir) ((void)0) |
45 | #define dma_unmap_page(dev, addr, size, dir) do { } while (0) | 45 | #define dma_unmap_page(dev, addr, size, dir) ((void)0) |
46 | #define dma_unmap_sg(dev, sg, nents, dir) do { } while (0) | 46 | #define dma_unmap_sg(dev, sg, nents, dir) ((void)0) |
47 | 47 | ||
48 | #define dma_mapping_error(addr) (0) | 48 | #define dma_mapping_error(addr) (0) |
49 | 49 | ||
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 7c7de87bd8ae..a19a6f1a1cf1 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, | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define __dma_alloc_coherent(gfp, size, handle) NULL | 39 | #define __dma_alloc_coherent(gfp, size, handle) NULL |
40 | #define __dma_free_coherent(size, addr) do { } while (0) | 40 | #define __dma_free_coherent(size, addr) ((void)0) |
41 | #define __dma_sync(addr, size, rw) do { } while (0) | 41 | #define __dma_sync(addr, size, rw) ((void)0) |
42 | #define __dma_sync_page(pg, off, sz, rw) do { } while (0) | 42 | #define __dma_sync_page(pg, off, sz, rw) ((void)0) |
43 | 43 | ||
44 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ | 44 | #endif /* ! CONFIG_NOT_COHERENT_CACHE */ |
45 | 45 | ||
@@ -251,7 +251,7 @@ dma_map_single(struct device *dev, void *ptr, size_t size, | |||
251 | } | 251 | } |
252 | 252 | ||
253 | /* We do nothing. */ | 253 | /* We do nothing. */ |
254 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 254 | #define dma_unmap_single(dev, addr, size, dir) ((void)0) |
255 | 255 | ||
256 | static inline dma_addr_t | 256 | static inline dma_addr_t |
257 | dma_map_page(struct device *dev, struct page *page, | 257 | dma_map_page(struct device *dev, struct page *page, |
@@ -266,7 +266,7 @@ dma_map_page(struct device *dev, struct page *page, | |||
266 | } | 266 | } |
267 | 267 | ||
268 | /* We do nothing. */ | 268 | /* We do nothing. */ |
269 | #define dma_unmap_page(dev, handle, size, dir) do { } while (0) | 269 | #define dma_unmap_page(dev, handle, size, dir) ((void)0) |
270 | 270 | ||
271 | static inline int | 271 | static inline int |
272 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 272 | 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, | |||
286 | } | 286 | } |
287 | 287 | ||
288 | /* We don't do anything here. */ | 288 | /* We don't do anything here. */ |
289 | #define dma_unmap_sg(dev, sg, nents, dir) do { } while (0) | 289 | #define dma_unmap_sg(dev, sg, nents, dir) ((void)0) |
290 | 290 | ||
291 | #endif /* CONFIG_PPC64 */ | 291 | #endif /* CONFIG_PPC64 */ |
292 | 292 | ||