[PATCH 1/4] misc: mic: scif: use complete() instead of complete_all()
From: Daniel Wagner
Date: Fri Aug 05 2016 - 05:26:18 EST
From: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>
There is only one waiter for the completion, therefore there
is no need to use complete_all(). Let's make that clear by
using complete() instead of complete_all().
The usage pattern of the completion is:
waiter context waker context
scif_get_node_info()
DECLARE_COMPLETION_ONSTACK(node_info);
msg->payload[3] = node_info
scif_nodeqp_send()
wait_for_completion(node_info)
scif_get_node_info_resp()
node_info = msg->payload[3]
complete(node_info)
Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx>
---
drivers/misc/mic/scif/scif_nodeqp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mic/scif/scif_nodeqp.c b/drivers/misc/mic/scif/scif_nodeqp.c
index c66ca1a..c9b3b64 100644
--- a/drivers/misc/mic/scif/scif_nodeqp.c
+++ b/drivers/misc/mic/scif/scif_nodeqp.c
@@ -1009,7 +1009,7 @@ scif_get_node_info_resp(struct scif_dev *scifdev, struct scifmsg *msg)
mutex_lock(&scif_info.conflock);
scif_info.maxid = msg->payload[1];
scif_info.total = msg->payload[2];
- complete_all(node_info);
+ complete(node_info);
mutex_unlock(&scif_info.conflock);
}
}
--
2.7.4