All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Lew <clew@codeaurora.org>
To: bjorn.andersson@linaro.org, andy.gross@linaro.org,
	david.brown@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com
Cc: aneela@codeaurora.org, linux-arm-msm@vger.kernel.org,
	linux-remoteproc@vger.kernel.org, linux-soc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	clew@codeaurora.org
Subject: [PATCH v3 3/6] rpmsg: glink: Use complete_all for open states
Date: Thu, 26 Apr 2018 15:59:02 -0700	[thread overview]
Message-ID: <1524783545-21951-4-git-send-email-clew@codeaurora.org> (raw)
In-Reply-To: <1524783545-21951-1-git-send-email-clew@codeaurora.org>

The open_req and open_ack completion variables are the state variables
to represet a remote channel as open. Use complete_all so there are no
races with waiters and using completion_done.

Signed-off-by: Chris Lew <clew@codeaurora.org>
---

Changes since v1:
- New change

 drivers/rpmsg/qcom_glink_native.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index c3f548e2ff20..120d6b9bb9f3 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -957,7 +957,7 @@ static int qcom_glink_rx_open_ack(struct qcom_glink *glink, unsigned int lcid)
 		return -EINVAL;
 	}
 
-	complete(&channel->open_ack);
+	complete_all(&channel->open_ack);
 
 	return 0;
 }
@@ -1401,7 +1401,7 @@ static int qcom_glink_rx_open(struct qcom_glink *glink, unsigned int rcid,
 	channel->rcid = ret;
 	spin_unlock_irqrestore(&glink->idr_lock, flags);
 
-	complete(&channel->open_req);
+	complete_all(&channel->open_req);
 
 	if (create_device) {
 		rpdev = kzalloc(sizeof(*rpdev), GFP_KERNEL);
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  parent reply	other threads:[~2018-04-26 22:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-26 22:58 [PATCH v3 0/6] Add chrdev and name query support for GLINK Chris Lew
2018-04-26 22:59 ` [PATCH v3 1/6] dt-bindings: soc: qcom: Add label for GLINK bindings Chris Lew
2018-04-27 17:05   ` Rob Herring
2018-04-26 22:59 ` [PATCH v3 2/6] rpmsg: glink: Store edge name for glink device Chris Lew
2018-04-26 22:59 ` Chris Lew [this message]
2018-04-26 22:59 ` [PATCH v3 4/6] rpmsg: Guard against null endpoint ops in destroy Chris Lew
2018-04-30  8:36   ` Arnaud Pouliquen
2018-04-30  8:36     ` Arnaud Pouliquen
2018-04-30 11:53     ` Arnaud Pouliquen
2018-04-30 11:53       ` Arnaud Pouliquen
2018-04-26 22:59 ` [PATCH v3 5/6] rpmsg: glink: Add support for rpmsg glink chrdev Chris Lew
2018-04-26 22:59 ` [PATCH v3 6/6] rpmsg: glink: Expose rpmsg name attr for glink Chris Lew

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=1524783545-21951-4-git-send-email-clew@codeaurora.org \
    --to=clew@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=aneela@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.