linux-next: arm allmodconfig
Pekka J Enberg
penberg at cs.helsinki.fi
Wed Oct 29 03:16:51 PDT 2008
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 at cs.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 at cs.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
More information about the xfs-masters
mailing list