aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/gfp.h4
-rw-r--r--include/linux/slab.h4
-rw-r--r--include/linux/string.h2
-rw-r--r--mm/mempool.c2
-rw-r--r--mm/slab.c12
5 files changed, 13 insertions, 11 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 8d6bf608b199..7c7400137e97 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -12,8 +12,8 @@ struct vm_area_struct;
12 * GFP bitmasks.. 12 * GFP bitmasks..
13 */ 13 */
14/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */ 14/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */
15#define __GFP_DMA 0x01 15#define __GFP_DMA 0x01u
16#define __GFP_HIGHMEM 0x02 16#define __GFP_HIGHMEM 0x02u
17 17
18/* 18/*
19 * Action modifiers - doesn't change the zoning 19 * Action modifiers - doesn't change the zoning
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 76cf7e60216c..4c8e552471b0 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -65,7 +65,7 @@ extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
65extern void kmem_cache_free(kmem_cache_t *, void *); 65extern void kmem_cache_free(kmem_cache_t *, void *);
66extern unsigned int kmem_cache_size(kmem_cache_t *); 66extern unsigned int kmem_cache_size(kmem_cache_t *);
67extern const char *kmem_cache_name(kmem_cache_t *); 67extern const char *kmem_cache_name(kmem_cache_t *);
68extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags); 68extern kmem_cache_t *kmem_find_general_cachep(size_t size, unsigned int __nocast gfpflags);
69 69
70/* Size description struct for general caches. */ 70/* Size description struct for general caches. */
71struct cache_sizes { 71struct cache_sizes {
@@ -105,7 +105,7 @@ extern unsigned int ksize(const void *);
105 105
106#ifdef CONFIG_NUMA 106#ifdef CONFIG_NUMA
107extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node); 107extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node);
108extern void *kmalloc_node(size_t size, int flags, int node); 108extern void *kmalloc_node(size_t size, unsigned int __nocast flags, int node);
109#else 109#else
110static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node) 110static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
111{ 111{
diff --git a/include/linux/string.h b/include/linux/string.h
index 93994c613095..dab2652acbd8 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -88,7 +88,7 @@ extern int memcmp(const void *,const void *,__kernel_size_t);
88extern void * memchr(const void *,int,__kernel_size_t); 88extern void * memchr(const void *,int,__kernel_size_t);
89#endif 89#endif
90 90
91extern char *kstrdup(const char *s, int gfp); 91extern char *kstrdup(const char *s, unsigned int __nocast gfp);
92 92
93#ifdef __cplusplus 93#ifdef __cplusplus
94} 94}
diff --git a/mm/mempool.c b/mm/mempool.c
index 9a72f7d918fa..65f2957b8d51 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -205,7 +205,7 @@ void * mempool_alloc(mempool_t *pool, unsigned int __nocast gfp_mask)
205 void *element; 205 void *element;
206 unsigned long flags; 206 unsigned long flags;
207 wait_queue_t wait; 207 wait_queue_t wait;
208 int gfp_temp; 208 unsigned int gfp_temp;
209 209
210 might_sleep_if(gfp_mask & __GFP_WAIT); 210 might_sleep_if(gfp_mask & __GFP_WAIT);
211 211
diff --git a/mm/slab.c b/mm/slab.c
index e57abd45eede..c9e706db4634 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -584,7 +584,8 @@ static inline struct array_cache *ac_data(kmem_cache_t *cachep)
584 return cachep->array[smp_processor_id()]; 584 return cachep->array[smp_processor_id()];
585} 585}
586 586
587static inline kmem_cache_t *__find_general_cachep(size_t size, int gfpflags) 587static inline kmem_cache_t *__find_general_cachep(size_t size,
588 unsigned int __nocast gfpflags)
588{ 589{
589 struct cache_sizes *csizep = malloc_sizes; 590 struct cache_sizes *csizep = malloc_sizes;
590 591
@@ -608,7 +609,8 @@ static inline kmem_cache_t *__find_general_cachep(size_t size, int gfpflags)
608 return csizep->cs_cachep; 609 return csizep->cs_cachep;
609} 610}
610 611
611kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags) 612kmem_cache_t *kmem_find_general_cachep(size_t size,
613 unsigned int __nocast gfpflags)
612{ 614{
613 return __find_general_cachep(size, gfpflags); 615 return __find_general_cachep(size, gfpflags);
614} 616}
@@ -2100,7 +2102,7 @@ cache_alloc_debugcheck_before(kmem_cache_t *cachep, unsigned int __nocast flags)
2100#if DEBUG 2102#if DEBUG
2101static void * 2103static void *
2102cache_alloc_debugcheck_after(kmem_cache_t *cachep, 2104cache_alloc_debugcheck_after(kmem_cache_t *cachep,
2103 unsigned long flags, void *objp, void *caller) 2105 unsigned int __nocast flags, void *objp, void *caller)
2104{ 2106{
2105 if (!objp) 2107 if (!objp)
2106 return objp; 2108 return objp;
@@ -2442,7 +2444,7 @@ got_slabp:
2442} 2444}
2443EXPORT_SYMBOL(kmem_cache_alloc_node); 2445EXPORT_SYMBOL(kmem_cache_alloc_node);
2444 2446
2445void *kmalloc_node(size_t size, int flags, int node) 2447void *kmalloc_node(size_t size, unsigned int __nocast flags, int node)
2446{ 2448{
2447 kmem_cache_t *cachep; 2449 kmem_cache_t *cachep;
2448 2450
@@ -3094,7 +3096,7 @@ unsigned int ksize(const void *objp)
3094 * @s: the string to duplicate 3096 * @s: the string to duplicate
3095 * @gfp: the GFP mask used in the kmalloc() call when allocating memory 3097 * @gfp: the GFP mask used in the kmalloc() call when allocating memory
3096 */ 3098 */
3097char *kstrdup(const char *s, int gfp) 3099char *kstrdup(const char *s, unsigned int __nocast gfp)
3098{ 3100{
3099 size_t len; 3101 size_t len;
3100 char *buf; 3102 char *buf;