[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1615879880-16832-1-git-send-email-wangqing@vivo.com>
Date: Tue, 16 Mar 2021 15:31:20 +0800
From: Wang Qing <wangqing@...o.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>
Subject: [PATCH] sched: completion: Reinterpret the meaning of completion_done()
The most intuitive meaning of completion_done() is to see if a completion has
been done, done=0 can only indicate that someone may be waiting.
Signed-off-by: Wang Qing <wangqing@...o.com>
---
kernel/sched/completion.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c
index a778554f9dad..c8ea7575cc41
--- a/kernel/sched/completion.c
+++ b/kernel/sched/completion.c
@@ -304,10 +304,10 @@ bool try_wait_for_completion(struct completion *x)
EXPORT_SYMBOL(try_wait_for_completion);
/**
- * completion_done - Test to see if a completion has any waiters
+ * completion_done - Test to see if a completion has been done
* @x: completion structure
*
- * Return: 0 if there are waiters (wait_for_completion() in progress)
+ * Return: 0 if there may be waiters (wait_for_completion() in progress)
* 1 if there are no waiters.
*
* Note, this will always return true if complete_all() was called on @X.
--
2.27.0
Powered by blists - more mailing lists