]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] mm/slab: fix sparse warnings
authorVictor Fusco <victor@cetuc.puc-rio.br>
Sat, 10 Sep 2005 07:26:36 +0000 (00:26 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 10 Sep 2005 17:06:26 +0000 (10:06 -0700)
Fix the sparse warning "implicit cast to nocast type"

Signed-off-by: Victor Fusco <victor@cetuc.puc-rio.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/slab.h
mm/slab.c

index 42a6bea58af369f4408eba0cf020dbc6d74352eb..1f356f3bbc6468d56a75abe833eea06280c199aa 100644 (file)
@@ -118,7 +118,8 @@ extern void kfree(const void *);
 extern unsigned int ksize(const void *);
 
 #ifdef CONFIG_NUMA
-extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node);
+extern void *kmem_cache_alloc_node(kmem_cache_t *,
+                       unsigned int __nocast flags, int node);
 extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node);
 #else
 static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
index 05a391059fe1d92b58a85fb5cb1e3039f6fa6468..9e876d6dfad97f2c4ab60a881edcb91d528c1c3c 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1720,7 +1720,7 @@ next:
        cachep->objsize = size;
 
        if (flags & CFLGS_OFF_SLAB)
-               cachep->slabp_cache = kmem_find_general_cachep(slab_size,0);
+               cachep->slabp_cache = kmem_find_general_cachep(slab_size, 0u);
        cachep->ctor = ctor;
        cachep->dtor = dtor;
        cachep->name = name;
@@ -2839,7 +2839,7 @@ out:
  * New and improved: it will now make sure that the object gets
  * put on the correct node list so that there is no false sharing.
  */
-void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid)
+void *kmem_cache_alloc_node(kmem_cache_t *cachep, unsigned int __nocast flags, int nodeid)
 {
        unsigned long save_flags;
        void *ptr;