Skip to contentSkip to conversation

tracing: Use DECLARE_COMPLETION_ONSTACK() for stack completion variable

PATCH New Matt Fleming 1 participant 1 message Jun 18, 2009 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: Use DECLARE_COMPLETION_ONSTACK() for stack completion variable

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.

---
 kernel/trace/trace_selftest.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
kernel/trace/trace_selftest.c +1 -3
index 00dd648..45e64e1 100644
@@ -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)) {
Signature · 1 line
1.6.3.2.306.g4f4fa