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: 9457565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B56BF6074E for ; Fri, 2 Dec 2016 01:00:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A85E3284AB for ; Fri, 2 Dec 2016 01:00:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D28F28518; Fri, 2 Dec 2016 01:00:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3584B284AB for ; Fri, 2 Dec 2016 01:00:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752976AbcLBBAA (ORCPT ); Thu, 1 Dec 2016 20:00:00 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:34526 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752480AbcLBA77 (ORCPT ); Thu, 1 Dec 2016 19:59:59 -0500 Received: by mail-pg0-f48.google.com with SMTP id x23so100905865pgx.1 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=PU1dq8V1tz1URBZPo8miMSIzdG/JxcLocrTliLkblVi5nLJH9SgOT5hNKI8aE2hbUR Kl2/oWMveDJiQywyuPDHqW61x6WsyUgjleoxp+3i0vfTiXL3McHGhXBlkXYS8kG4VCx4 tvNwhWZ37A2DbIWWFK7cNMsdgfTjGp7tEfwUrydD84skLpu1DCujidKFjfAMO7EnuIY8 Ver0hJ+MhW5w5DnQnw9BEeJAb5kd9895szgxk8XtjupsYO4sxpfuzUYCJgcCqm0z7mlW TSue0hepWoIO3GYFXq/PrzeII5c4AWZeAciG2ZQzWzJZf4ql0mhzr6VGURL0loeRLABI cmTw== X-Gm-Message-State: AKaTC02/RGHBHAAjrc6plbYRF62rai3tkaP6mTDyGRYxhfb8NIyB+Fm+0R6uW81/Pzu4XOEV 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-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; }