aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Lameter <cl@linux.com>2013-09-04 15:58:08 -0400
committerPekka Enberg <penberg@kernel.org>2013-09-04 16:11:42 -0400
commit23774a2f6fee0848503bfb8004eeeb5adef94f5c (patch)
treed1a1a8d6689da0ea98c1c69a516b922b149d17b7 /include/linux
parent76b6f3d255a327383c89cb8c8384872dd4a0a054 (diff)
slab: Use correct GFP_DMA constant
On Thu, 5 Sep 2013, kbuild test robot wrote: > >> include/linux/slab.h:433:53: sparse: restricted gfp_t degrades to integer > 429 static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node) > 430 { > 431 #ifndef CONFIG_SLOB > 432 if (__builtin_constant_p(size) && > > 433 size <= KMALLOC_MAX_CACHE_SIZE && !(flags & SLAB_CACHE_DMA)) { > 434 int i = kmalloc_index(size); > 435 flags is of type gfp_t and not a slab internal flag. Therefore use GFP_DMA. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/slab.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 386af639dcaa..74f105847d13 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -430,7 +430,7 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
430{ 430{
431#ifndef CONFIG_SLOB 431#ifndef CONFIG_SLOB
432 if (__builtin_constant_p(size) && 432 if (__builtin_constant_p(size) &&
433 size <= KMALLOC_MAX_CACHE_SIZE && !(flags & SLAB_CACHE_DMA)) { 433 size <= KMALLOC_MAX_CACHE_SIZE && !(flags & GFP_DMA)) {
434 int i = kmalloc_index(size); 434 int i = kmalloc_index(size);
435 435
436 if (!i) 436 if (!i)