From patchwork Fri Dec 2 00:59:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 86181 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp29361qgi; Thu, 1 Dec 2016 17:00:02 -0800 (PST) X-Received: by 10.98.75.11 with SMTP id y11mr41416828pfa.30.1480640402187; Thu, 01 Dec 2016 17:00:02 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n34si2380679pld.250.2016.12.01.17.00.01; Thu, 01 Dec 2016 17:00:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752930AbcLBBAA (ORCPT + 9 others); Thu, 1 Dec 2016 20:00:00 -0500 Received: from mail-pg0-f44.google.com ([74.125.83.44]:33515 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437AbcLBA77 (ORCPT ); Thu, 1 Dec 2016 19:59:59 -0500 Received: by mail-pg0-f44.google.com with SMTP id 3so100897378pgd.0 for ; Thu, 01 Dec 2016 16:59:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=t7m9IDbtsryZxD0s9QjrPYR8HApbAdFyimt0QV6+604=; b=aQJGmnzmVhK8goofcnR4PNFRC7IfFAWEBow37295CUOhXdq74MAnDWhRMndpdc13Js xwq3L2pkPz2Mpvj92kzaXPjUwd6NindPIS0j62/qKVRRmQ2eBd5lj0abIkROUiNME5BF DDeTiWhnCbWaQ7m4CHm7F2408ORrQYX4Y0BGc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=t7m9IDbtsryZxD0s9QjrPYR8HApbAdFyimt0QV6+604=; b=mlA4TSMYj+S41gQpW7mL3NoPF85gZ2p2bDffJgxB6aXLknnRlaBO7R+Bi10MZLKiHt SdUkyDHoIIt+/IhSfin4HP/dQohbf76T2A9PH2VC6qqhr23ns6q09RpBSp5IpWm816ar KZLfJupMUTMEfmgAPdUWBuHbwnS0EU7QJ4WsGozVyHffRlMlH66f48N1Nfwb6kVO6m2G k70InDPLCNMXHAy3AFCmnMfUtsVVu5ghQzVTunnI2Fq9yZC72q3ZUsAeIFD3ZdcitJid /mq1B1qGSFE48NIqDbM6cEUnUXkZJt88X2zh1jmG/nMIwhpkpRFstjwVPhF6AAMFty8a 18uw== X-Gm-Message-State: AKaTC00a6mnM0YFVyQfdcewndp9iqpL2K4/+yGNzVgq7X95aXHqB7RkMmO1/5dDJSZGJZOtp X-Received: by 10.99.245.21 with SMTP id w21mr75272282pgh.5.1480640398749; Thu, 01 Dec 2016 16:59:58 -0800 (PST) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id m66sm2840882pfm.3.2016.12.01.16.59.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Dec 2016 16:59:57 -0800 (PST) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] rpmsg: qcom_smd: Correct return value for O_NONBLOCK Date: Thu, 1 Dec 2016 16:59:55 -0800 Message-Id: <1480640395-19661-1-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org qcom_smd_send() should return -EAGAIN for non-blocking channels with insufficient space, so that we can propagate this event to user space. Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: Bjorn Andersson --- drivers/rpmsg/qcom_smd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 7552ef0e82ba..beaef5dd973e 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -742,7 +742,7 @@ static int __qcom_smd_send(struct qcom_smd_channel *channel, const void *data, while (qcom_smd_get_tx_avail(channel) < tlen) { if (!wait) { - ret = -ENOMEM; + ret = -EAGAIN; goto out; }