[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0810291215220.32108@melkki.cs.Helsinki.FI>
Date: Wed, 29 Oct 2008 12:16:51 +0200 (EET)
From: Pekka J Enberg <penberg@...helsinki.fi>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
Dave Airlie <airlied@...ux.ie>, netdev@...r.kernel.org,
linux-arm-kernel@...ts.arm.linux.org.uk,
Herbert Xu <herbert@...dor.apana.org.au>,
Paul Moore <paul.moore@...com>, Takashi Iwai <tiwai@...e.de>,
xfs-masters@....sgi.com
Subject: Re: linux-next: arm allmodconfig
On Tue, 28 Oct 2008, Andrew Morton wrote:
> > include/linux/slub_def.h:231: warning: 'ret' might be used uninitialized in this function
> > include/linux/slub_def.h:231: warning: 'ret' might be used uninitialized in this function
>
> I lost interest here.
Looks like a bogus warning to me. But we might as well clean it up a bit
and maybe the compiler is less confused that way.
Pekka
>From 48724e2995a0fd292d326f79caebe61f4f115021 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@...helsinki.fi>
Date: Wed, 29 Oct 2008 12:13:37 +0200
Subject: [PATCH] slub: avoid bogus warning on arm
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@...helsinki.fi>
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists