From 1fda107d44de1e8df2bdfd1d4a2c12a338b8d725 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 11 Apr 2012 11:52:18 +0200 Subject: debugobjects: Remove unused return value from fill_pool() Signed-off-by: Thomas Gleixner --- lib/debugobjects.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 0ab9ae8..3e5cd7c 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -79,17 +79,17 @@ static const char *obj_states[ODEBUG_STATE_MAX] = { [ODEBUG_STATE_NOTAVAILABLE] = "not available", }; -static int fill_pool(void) +static void fill_pool(void) { gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; struct debug_obj *new; unsigned long flags; if (likely(obj_pool_free >= ODEBUG_POOL_MIN_LEVEL)) - return obj_pool_free; + return; if (unlikely(!obj_cache)) - return obj_pool_free; + return; while (obj_pool_free < ODEBUG_POOL_MIN_LEVEL) { @@ -102,7 +102,6 @@ static int fill_pool(void) obj_pool_free++; raw_spin_unlock_irqrestore(&pool_lock, flags); } - return obj_pool_free; } /* -- cgit v1.1 From 765a5e0cb581ef32646f58a213b38b56c77709b0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 11 Apr 2012 11:54:27 +0200 Subject: debugobjects: printk with irqs enabled No point in keeping interrupts disabled here. Signed-off-by: Thomas Gleixner --- lib/debugobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 3e5cd7c..1b6c00a 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -1051,10 +1051,10 @@ static int __init debug_objects_replace_static_objects(void) cnt++; } } + local_irq_enable(); printk(KERN_DEBUG "ODEBUG: %d of %d active objects replaced\n", cnt, obj_pool_used); - local_irq_enable(); return 0; free: hlist_for_each_entry_safe(obj, node, tmp, &objects, node) { -- cgit v1.1 From 3340808cf04faad7b87d6c6e13800825e5552b51 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 18 Apr 2012 14:28:10 +0300 Subject: debugobjects: Fill_pool() returns void now MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was a return missed in 1fda107d44 "debugobjects: Remove unused return value from fill_pool()". It makes gcc complain: lib/debugobjects.c: In function ‘fill_pool’: lib/debugobjects.c:98:4: warning: ‘return’ with a value, in function returning void [enabled by default] Signed-off-by: Dan Carpenter Link: http://lkml.kernel.org/r/20120418112810.GA2669@elgon.mountain Signed-off-by: Thomas Gleixner --- lib/debugobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 1b6c00a..d11808c 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -95,7 +95,7 @@ static void fill_pool(void) new = kmem_cache_zalloc(obj_cache, gfp); if (!new) - return obj_pool_free; + return; raw_spin_lock_irqsave(&pool_lock, flags); hlist_add_head(&new->node, &obj_pool); -- cgit v1.1