[patch 3/5] dmapool: Fix "nocast type" warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Victor Fusco <[email protected]>


Fix the sparse warning "implicit cast to nocast type"

File/Subsystem:drivers/base/dmapool

Signed-off-by: Victor Fusco <[email protected]>
Signed-off-by: Domen Puncer <[email protected]>

--

---
 drivers/base/dmapool.c  |    3 ++-
 include/linux/dmapool.h |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Index: quilt/drivers/base/dmapool.c
===================================================================
--- quilt.orig/drivers/base/dmapool.c
+++ 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;
Index: quilt/include/linux/dmapool.h
===================================================================
--- quilt.orig/include/linux/dmapool.h
+++ 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);
 

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux