mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tracing: Use DECLARE_COMPLETION_ONSTACK() for stack completion variable
@ 2009-06-18 11:01 Matt Fleming
  0 siblings, 0 replies; only message in thread
From: Matt Fleming @ 2009-06-18 11:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, rostedt, Matt Fleming

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-18 11:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-18 11:01 [PATCH] tracing: Use DECLARE_COMPLETION_ONSTACK() for stack completion variable Matt Fleming

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®