xfs-masters
[Top] [All Lists]

[PATCH] slub: avoid bogus warning on arm

Subject: [PATCH] slub: avoid bogus warning on arm
From: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
Date: Wed, 29 Oct 2008 12:13:37 +0200
Move the ret variable to where we actually need it in an attempt to avoid a
bugs warning when compiling for ARM.

Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx>
---
 include/linux/slub_def.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
index dc28432..4d3de0c 100644
--- a/include/linux/slub_def.h
+++ b/include/linux/slub_def.h
@@ -228,14 +228,13 @@ static __always_inline void *kmalloc_large(size_t size, 
gfp_t flags)
 
 static __always_inline void *kmalloc(size_t size, gfp_t flags)
 {
-       void *ret;
-
        if (__builtin_constant_p(size)) {
                if (size > PAGE_SIZE)
                        return kmalloc_large(size, flags);
 
                if (!(flags & SLUB_DMA)) {
                        struct kmem_cache *s = kmalloc_slab(size);
+                       void *ret;
 
                        if (!s)
                                return ZERO_SIZE_PTR;
-- 
1.5.4.3


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] slub: avoid bogus warning on arm, Pekka Enberg <=