Skip to contentSkip to conversation

dmapool: Fix "nocast type" warnings

PATCH In review [email protected] 1 participant 1 message Jul 14, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/5 dmapool: Fix "nocast type" warnings

From: Victor Fusco <[email protected]>

Fix the sparse warning "implicit cast to nocast type"

File/Subsystem:drivers/base/dmapool

--

---
 drivers/base/dmapool.c  |    3 ++-
 include/linux/dmapool.h |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/base/dmapool.c +2 -1
Index: quilt/drivers/base/dmapool.c
===================================================================
@@ -262,7 +262,8 @@ dma_pool_destroy (struct dma_pool *pool)
  * If such a memory block can't be allocated, null is returned.
  */
 void *
-dma_pool_alloc (struct dma_pool *pool, int mem_flags, dma_addr_t *handle)
+dma_pool_alloc (struct dma_pool *pool, unsigned int __nocast mem_flags,
+		dma_addr_t *handle)
 {
 	unsigned long		flags;
 	struct dma_page		*page;
include/linux/dmapool.h +2 -1
Index: quilt/include/linux/dmapool.h
===================================================================
@@ -19,7 +19,8 @@ struct dma_pool *dma_pool_create(const c
 
 void dma_pool_destroy(struct dma_pool *pool);
 
-void *dma_pool_alloc(struct dma_pool *pool, int mem_flags, dma_addr_t *handle);
+void *dma_pool_alloc(struct dma_pool *pool, unsigned int __nocast mem_flags,
+		     dma_addr_t *handle);
 
 void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
 

--