Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp63958ybc; Fri, 22 Nov 2019 02:06:50 -0800 (PST) X-Google-Smtp-Source: APXvYqzDWhRvbIiYAx/bQkIajJZPkgd6q/GeFKeON/wbop7XoJ6Ks1LEAqzB5Kx4/stStHF/Dxaa X-Received: by 2002:a17:906:4d93:: with SMTP id s19mr20905272eju.285.1574417209976; Fri, 22 Nov 2019 02:06:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574417209; cv=none; d=google.com; s=arc-20160816; b=x4XHEIGK923WrI22HMuxw+wVebPw8D1kUUvlm8/Cwq3NUnUInzgrSIbKy6WMemHgYZ 59JQqbWl2tOVJjCItsWZqwdNb4bKTO78i0/0eiPlFaZvjwjpOpt/jihR7/o3vQYCGmQO 1f/hNnkUX2Qf8fGIVi2ICdRgQMYUMCqqCLsBdSQ5l0mPeJ/xBeZpwocnP6tNBUSwJdLx vZXx8sIEVj/eIRcRfd7GG2sn/nDAoWfmZEyvPNj2DxJ6JknicD19YnfvVnkMzUQ7VcOD l0XQl5cdkRCFHsvpvteARwPhGowHzqFRvoCcpCWoDHswqauzxazo3nayVY50fXlKKJQl IPeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:references:in-reply-to :message-id:date:subject:cc:to:from:dmarc-filter:dkim-signature :dkim-signature; bh=qDygoZ4TTHdQCCKgQMXh2318rdwqK4CqCKe5Ve22UFc=; b=Ym+apQ1hPVikvSdrzAHCBk5dUdW8EqZpjJ85KO50H2ntMpkeRo4Wjl7Os8vqI6LL79 1E1BqitorBUZVtzm8YnfRwsxxbDV0ZoEMNbsM2J+psCA2rkjGWSpiuI0TxjE3ajUT1hQ MxsFOAOpHNRgffDITZ4jG34n9iq7wLVY7xfB02Xnjt+SpPL3DILQClYNDPNWJriF/naT 2LcoXH6yN2C9ItbzT9rXrgGk/BXJh9oqhOcGXx43Iau8BxhV6l3ypjXigD8sNJqW3/2Q xnX0dcp85JQLtqUXD9v4G+tpEP7IC0Tyh+ksOP1xVNjeJiF59lapGEdMcbVPHmt6kAJ4 pOjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=hb3O+Xq4; dkim=pass header.i=@amazonses.com header.s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx header.b=Bkl09Lnw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id br3si3878130ejb.436.2019.11.22.02.06.25; Fri, 22 Nov 2019 02:06:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=hb3O+Xq4; dkim=pass header.i=@amazonses.com header.s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx header.b=Bkl09Lnw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726992AbfKVKFN (ORCPT + 99 others); Fri, 22 Nov 2019 05:05:13 -0500 Received: from a27-188.smtp-out.us-west-2.amazonses.com ([54.240.27.188]:58930 "EHLO a27-188.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbfKVKFM (ORCPT ); Fri, 22 Nov 2019 05:05:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1574417112; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; bh=H+g+qJFH/vfHX/ghCFjKyPO+zFPalcaiUQga99x31CQ=; b=hb3O+Xq4mlhXXggVAuxIFxnhnEF2YtTVck95i4dfljS8NRcZOvozD2PUuTYmzom7 zXJPKKYMoDWDhxJEOpMT2RO3WUpEX8N/CABs/sCTCw5LqCHfD8FHPuRxblWQU2YXQ4t Ows1VOpyzEwcRBRBV38L6ymkceG31bfqDxnz9y6I= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=gdwg2y3kokkkj5a55z2ilkup5wp5hhxx; d=amazonses.com; t=1574417112; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:Feedback-ID; bh=H+g+qJFH/vfHX/ghCFjKyPO+zFPalcaiUQga99x31CQ=; b=Bkl09Lnw/Sdw9J/7L+Yk7kMeZBmCOt01i81FY1EHRAwMX3nUNNZMPKlhjBhNE0pP 95SLIfgLmgdKOYNYWZptiEFVnfIymklOMcJvvXLrZV1udgL/c5XC/5yXEEOTh7kNtLL TGNg5Bu5pRaHNfvLiEYAL5WdqNpN/3pMtg8t/ulM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CB922C48B2F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=aneela@codeaurora.org From: Arun Kumar Neelakantam To: ohad@wizery.com, bjorn.andersson@linaro.org, clew@codeaurora.org, sricharan@codeaurora.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Arun Kumar Neelakantam , Andy Gross , linux-arm-msm@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT) Subject: [PATCH V5 1/5] rpmsg: glink: Use complete_all for open states Date: Fri, 22 Nov 2019 10:05:12 +0000 Message-ID: <0101016e92929ca4-d99d10e1-9b60-46d2-a0fd-9eb6bc3c7b09-000000@us-west-2.amazonses.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1574417087-27594-1-git-send-email-aneela@codeaurora.org> References: <1574417087-27594-1-git-send-email-aneela@codeaurora.org> X-SES-Outgoing: 2019.11.22-54.240.27.188 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Lew 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 Signed-off-by: Arun Kumar Neelakantam --- 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 621f1af..609a150f 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); -- 1.9.1