linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Irina Tirdea <irina.tirdea@gmail.com>
To: mingo@redhat.com, acme@ghostprotocols.net,
	a.p.zijlstra@chello.nl, rostedt@goodmis.org
Cc: paulus@samba.org, dsahern@gmail.com, namhyung.kim@lge.com,
	linux-kernel@vger.kernel.org,
	Irina Tirdea <irina.tirdea@intel.com>
Subject: [PATCH v3 5/6] perf tools: fix no return in non-void function
Date: Tue, 11 Sep 2012 01:15:02 +0300	[thread overview]
Message-ID: <1347315303-29906-6-git-send-email-irina.tirdea@intel.com> (raw)
In-Reply-To: <1347315303-29906-1-git-send-email-irina.tirdea@intel.com>

thread_func in builtin-sched.c has an internal loop and never returns.
The only return from this thread are BUG_ON calls in case return values
are not 0.

The compiler on Android complains that the function needs to return a
non-void value. Adding the noreturn function attribute to fix this error.

Error in Android:
target C: perf <= builtin-sched.c
hardware/intel/linu/tools/perf/builtin-sched.c: In function 'thread_func':
hardware/intel/linux/tools/perf/builtin-sched.c:476: error: no return
statement in function returning non-void

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
---
 tools/perf/builtin-sched.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index a25a023..1fecc95 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -439,7 +439,7 @@ static u64 get_cpu_usage_nsec_self(int fd)
 	return runtime;
 }
 
-static void *thread_func(void *ctx)
+static __attribute__ ((noreturn)) void *thread_func(void *ctx)
 {
 	struct task_desc *this_task = ctx;
 	u64 cpu_usage_0, cpu_usage_1;
-- 
1.7.9.5


  parent reply	other threads:[~2012-09-10 22:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 22:14 [PATCH v3 0/6] Porting perf to Android Irina Tirdea
2012-09-10 22:14 ` [PATCH v3 1/6] perf tools: include wrapper for magic.h Irina Tirdea
2012-09-14  5:53   ` [tip:perf/core] " tip-bot for Irina Tirdea
2012-09-10 22:14 ` [PATCH v3 2/6] perf tools: update types definitions for Android Irina Tirdea
2012-09-14  5:55   ` [tip:perf/core] perf tools: Update " tip-bot for Irina Tirdea
2012-09-10 22:15 ` [PATCH v3 3/6] perf tools: include __WORDSIZE definition Irina Tirdea
2012-09-14  5:56   ` [tip:perf/core] " tip-bot for Irina Tirdea
2012-09-10 22:15 ` [PATCH v3 4/6] perf tools: fix ALIGN redefinition in system headers Irina Tirdea
2012-09-14  5:57   ` [tip:perf/core] " tip-bot for Irina Tirdea
2012-09-10 22:15 ` Irina Tirdea [this message]
2012-09-10 22:15 ` [PATCH v3 6/6] perf tools: Use __maybe_used for unused variables Irina Tirdea
2012-09-14  6:02   ` [tip:perf/core] " tip-bot for Irina Tirdea

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=1347315303-29906-6-git-send-email-irina.tirdea@intel.com \
    --to=irina.tirdea@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=dsahern@gmail.com \
    --cc=irina.tirdea@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung.kim@lge.com \
    --cc=paulus@samba.org \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).