lkml.org 
[lkml]   [2018]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V4 3/9] rpmsg: glink: Use complete_all for open states
    Date
    From: Chris Lew <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>
    Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
    ---
    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 22a3cac..f43341d 100644
    --- a/drivers/rpmsg/qcom_glink_native.c
    +++ b/drivers/rpmsg/qcom_glink_native.c
    @@ -949,7 +949,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;
    }
    @@ -1393,7 +1393,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
    \
     
     \ /
      Last update: 2018-07-27 14:19    [W:6.933 / U:1.576 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site