mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, rostedt@goodmis.org,
	Matt Fleming <matt@console-pimps.org>
Subject: [PATCH] tracing: Use DECLARE_COMPLETION_ONSTACK() for stack completion variable
Date: Thu, 18 Jun 2009 12:01:34 +0100	[thread overview]
Message-ID: <1245322894-12951-1-git-send-email-matt@console-pimps.org> (raw)

init_completion() is for use with dynamically allocated
completions. The 'isrt' completion is not dynamically allocated but is
allocated on the stack, so use the appropriate macro for lockdep's
benefit.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
---
 kernel/trace/trace_selftest.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 00dd648..45e64e1 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -586,12 +586,10 @@ trace_selftest_startup_wakeup(struct tracer *trace, struct trace_array *tr)
 {
 	unsigned long save_max = tracing_max_latency;
 	struct task_struct *p;
-	struct completion isrt;
+	DECLARE_COMPLETION_ONSTACK(isrt);
 	unsigned long count;
 	int ret;
 
-	init_completion(&isrt);
-
 	/* create a high prio thread */
 	p = kthread_run(trace_wakeup_test_thread, &isrt, "ftrace-test");
 	if (IS_ERR(p)) {
-- 
1.6.3.2.306.g4f4fa


                 reply	other threads:[~2009-06-18 11:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1245322894-12951-1-git-send-email-matt@console-pimps.org \
    --to=matt@console-pimps.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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

all inboxes | Powered by JetHome®