All of lore.kernel.org
 help / color / mirror / Atom feed
From: gang.chen@asianux.com (Chen Gang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] kernel/sched/core.c: need return NULL when BUG() is defined as empty.
Date: Mon, 20 May 2013 15:48:53 +0800	[thread overview]
Message-ID: <5199D565.4070307@asianux.com> (raw)


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

WARNING: multiple messages have this Message-ID (diff)
From: Chen Gang <gang.chen@asianux.com>
To: "mingo@redhat.com" <mingo@redhat.com>, peterz@infradead.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH] kernel/sched/core.c: need return NULL when BUG() is defined as empty.
Date: Mon, 20 May 2013 15:48:53 +0800	[thread overview]
Message-ID: <5199D565.4070307@asianux.com> (raw)


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

             reply	other threads:[~2013-05-20  7:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20  7:48 Chen Gang [this message]
2013-05-20  7:48 ` [PATCH] kernel/sched/core.c: need return NULL when BUG() is defined as empty 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5199D565.4070307@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.