Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp826732ybv; Thu, 20 Feb 2020 08:00:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzTBUutchcjfEwEMJcf6IDSAtjmbWL7LLGjvGVqdntDWciXS5Fgx8yaKT6fe/rlkTnX48Rs X-Received: by 2002:aca:ef54:: with SMTP id n81mr2713376oih.86.1582214445268; Thu, 20 Feb 2020 08:00:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582214445; cv=none; d=google.com; s=arc-20160816; b=FBzlYqUmpSnPCCUsxEx5C96riRioQIRqVxvvJWRsvn6xR5RTmKYjugZcNNP7koFQGx w5utstI0a4AhEOuO4GvtUFIS45VN6bn32WdOzSyleERXdVNOAqQD30FqLvAHR5PS7nvG KNmieryWxGFFtX98ZgstHBQ0ihtIbVbA4hVQIVPKzTbTFstDVEGhwZ1sWr1PrIOtxARu FG5Cxzv3LZ8pRBl1Zzkz9snWaw53MBUV9zefwH6SXl7Qhyz2y0EWUH2SkYKfaGU2Xek/ bDKyBW9dwKCFYWm8nVLjgC9VuDrkJ13m1km9CeQX9TLvyOmyrUUvqk0skwXjIP9w+026 a+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=5Njtd0t17HBau9DIGbCV2usC5jvJHu/LzGXPbXDYij0=; b=QtTFC4qUC6Q8IaNCPvAO4VEkwisKXWpu1QKxx6aH8fR5OQ/J8Sn96LatFxkuuLWGkc BLLXV4xju8pU/WU6PJdMJqQ7Zp2tRKMswsccNh4S/13pl3si37Bxt88wwjsY7fq8PtaV NxvFnft/UpsDwAfwcLLQ3mbCtS5cYnJV3cWdMFqqsTUR58mjrsFjNedjKRZI99U+Seet rcCYC1oiw3R6lhtw+aC++UKX5eoviYHMZfOzO1Hb1YrdkrK83kC6oH4v3auWi1ReJrFM CkHYn0iCmzBUpB1ptqUbIUVGI0+/fq6biZeP9keMXWfsANTWshstkQLHHhQ2HmGdkJVn 0HSg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v23si1771692oto.81.2020.02.20.08.00.32; Thu, 20 Feb 2020 08:00:45 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728766AbgBTP7s (ORCPT + 99 others); Thu, 20 Feb 2020 10:59:48 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47612 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728653AbgBTP7W (ORCPT ); Thu, 20 Feb 2020 10:59:22 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id E421529519F From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Cc: Collabora Kernel ML , groeck@chromium.org, bleung@chromium.org, dtor@chromium.org, gwendal@chromium.org, pmalani@chromium.org Subject: [PATCH 4/8] platform/chrome: cros_ec_chardev: Use cros_ec_cmd_xfer_status helper Date: Thu, 20 Feb 2020 16:58:55 +0100 Message-Id: <20200220155859.906647-5-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200220155859.906647-1-enric.balletbo@collabora.com> References: <20200220155859.906647-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch makes use of cros_ec_cmd_xfer_status() instead of cros_ec_cmd_xfer(). In this case the change is trivial and the only reason to do it is because we want to make cros_ec_cmd_xfer() a private function for the EC protocol and let people only use the cros_ec_cmd_xfer_status() to return Linux standard error codes. Signed-off-by: Enric Balletbo i Serra --- drivers/platform/chrome/cros_ec_chardev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_chardev.c b/drivers/platform/chrome/cros_ec_chardev.c index c65e70bc168d..b51ab24055f3 100644 --- a/drivers/platform/chrome/cros_ec_chardev.c +++ b/drivers/platform/chrome/cros_ec_chardev.c @@ -301,7 +301,7 @@ static long cros_ec_chardev_ioctl_xcmd(struct cros_ec_dev *ec, void __user *arg) } s_cmd->command += ec->cmd_offset; - ret = cros_ec_cmd_xfer(ec->ec_dev, s_cmd); + ret = cros_ec_cmd_xfer_status(ec->ec_dev, s_cmd); /* Only copy data to userland if data was received. */ if (ret < 0) goto exit; -- 2.25.0