All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/sched/core.c: need return NULL when BUG() is defined as empty.
@ 2013-05-20  7:48 ` Chen Gang
  0 siblings, 0 replies; 12+ messages in thread
From: Chen Gang @ 2013-05-20  7:48 UTC (permalink / raw)
  To: linux-arm-kernel


When neither CONFIG_BUG nor HAVE_ARCH_BUG is defined, need let function
return failure value ('NULL') instead of random value.

It is generated by randconfig with MMU for arm s5pv210 with
EXTRA_CFALGS=-W.

The related warnings:
  kernel/sched/core.c:2353:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 kernel/sched/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 9ff7744..94ef8ff 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2350,6 +2350,7 @@ pick_next_task(struct rq *rq)
 	}
 
 	BUG(); /* the idle class will always have a runnable task */
+	return NULL;
 }
 
 /*
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-05-23  1:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-20  7:48 [PATCH] kernel/sched/core.c: need return NULL when BUG() is defined as empty Chen Gang
2013-05-20  7:48 ` Chen Gang
2013-05-22  9:11 ` Peter Zijlstra
2013-05-22  9:11   ` Peter Zijlstra
2013-05-22  9:29   ` Chen Gang
2013-05-22  9:29     ` Chen Gang
2013-05-22 13:33   ` Russell King - ARM Linux
2013-05-22 13:33     ` Russell King - ARM Linux
2013-05-22 16:19     ` Peter Zijlstra
2013-05-22 16:19       ` Peter Zijlstra
2013-05-23  1:00       ` Chen Gang
2013-05-23  1:00         ` Chen Gang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.