Received: by 10.192.165.148 with SMTP id m20csp63299imm; Thu, 26 Apr 2018 16:02:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx49TSKoOnJCz4HAwBO0mSTZMpPlxzLrLelF2/BdE96H5JIgUUeLimizxsgKWBnwJEBlcown/ X-Received: by 2002:a17:902:c24:: with SMTP id 33-v6mr35022204pls.88.1524783773909; Thu, 26 Apr 2018 16:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524783773; cv=none; d=google.com; s=arc-20160816; b=SjqPMYj54svLSZp0L7nMQysTuv9HTj8MoRohbKwYWSVnMQk8M8CcNFBBVYNVpwNrmG auOwFckWBBXPBmruLSKobYSXVtu+yqzsPjYGlq1eoyp5goropz7/n/ZVDzUdLbbDzYLF hSYdGYxmB21PYhGEi7gvZkev+De4RIiMdHis9YhY5hC4ExVVxMzeV+1hiV7mtKldwvhu 26aEOFqcWztwM9W3zOjc4QqNhIFNZPQA61rmb172FpH0UEEEDfmlIdHrXDINIYI8SmXr FbhzDdbsQvIW3aplKheLYHvOoR+kfuAy7ccgLiNmkNbnBvtLU2BqmfQAJA7+ANf4RwPF 3ipw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=AhPxS6ezmu0r0jSZWDqRXT7zQAlKmtlrDqMgGF7fCZM=; b=qZN7l9s9Z00MtS4shGgP8MgQANnqUJmalUA1f6ke0fXdGM6tV3yzO6MlbFeMP8N+yH 8j9TOlgdSP9KtU1PWwiCx6F3B2zHDiVo6oKzG9ahqax21eeJydhI7mCnOKr4Z2typUkz +HLwhwYgYZdsY4EDjEZJV/PP0jxa8eKmNIPVgESEcNQiKs2xykb2+fR7xECp3x8/VPoC CNDNDBnWHT2HoRJIE2GTSOAQAUFamw+XxcXCm8jfL84riaMrM6uH0nhozJIcetdcG6Nk 0kM0k2kdyFl3YJJ3dVaWIVtWyBtskN3d7xTfjKLWFKi0AWUL2ypf75LwS1M+5aKVARIm ztsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=edkOWnEt; dkim=pass header.i=@codeaurora.org header.s=default header.b=RirYEFJt; 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 d18si17113884pgo.310.2018.04.26.16.02.39; Thu, 26 Apr 2018 16:02:53 -0700 (PDT) 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=default header.b=edkOWnEt; dkim=pass header.i=@codeaurora.org header.s=default header.b=RirYEFJt; 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 S932310AbeDZXAu (ORCPT + 99 others); Thu, 26 Apr 2018 19:00:50 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37738 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756394AbeDZW71 (ORCPT ); Thu, 26 Apr 2018 18:59:27 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 10E7860C66; Thu, 26 Apr 2018 22:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524783567; bh=PncrJar2lMH+54y6mOPXVRJPwgyjdf/DBQxkUJSqKMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=edkOWnEtF1AMts62o9GEK9aXXHBl8cDx+Kih0s2gFrsK2MZcnGAMHsteAB/IUCRor 09MyfWGa7xvRkm7FvSUFtorUJmYhOt06UEziEk0rxyn8xwgZSzG9gPHztU88J7/QNy NQabche5bZVealu1LYIm/q3tlyBbfVMZC0AezbH4= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from clew-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: clew@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id F1E8060F5F; Thu, 26 Apr 2018 22:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524783566; bh=PncrJar2lMH+54y6mOPXVRJPwgyjdf/DBQxkUJSqKMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RirYEFJt59cB7/lAc7IUrPeLAx1ZnGGTybqYn5GTmgHSojCjMz6Y72TtvgwKyj24r N4XQGuL42B4VMece5cZmTgbkN1XWTp3ly1I4N/DINXkAa856LV7oykMP/C0UAQVmtW pgqOL/zhG0G30Gr8OKx/jCnULosGeUID5OVPNU9s= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F1E8060F5F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=clew@codeaurora.org From: Chris Lew 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 Message-Id: <1524783545-21951-4-git-send-email-clew@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1524783545-21951-1-git-send-email-clew@codeaurora.org> References: <1524783545-21951-1-git-send-email-clew@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- 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