From patchwork Fri Apr 24 06:40:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cao Minh Hiep X-Patchwork-Id: 6266541 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4A48DBF4A6 for ; Fri, 24 Apr 2015 06:41:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7BA5120268 for ; Fri, 24 Apr 2015 06:41:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FD5320263 for ; Fri, 24 Apr 2015 06:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932746AbbDXGlA (ORCPT ); Fri, 24 Apr 2015 02:41:00 -0400 Received: from qecsay241.secure.ne.jp ([158.199.161.241]:40976 "HELO m119.secure.ne.jp" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S932542AbbDXGk7 (ORCPT ); Fri, 24 Apr 2015 02:40:59 -0400 Received: (qmail 64086 invoked from network); 24 Apr 2015 15:40:57 +0900 Received: from unknown (HELO localhost) (61.118.107.10) by 0 with SMTP; 24 Apr 2015 15:40:57 +0900 From: Cao Minh Hiep To: geert+renesas@glider.be Cc: broonie@kernel.org, linux-spi@vger.kernel.org, kuninori.morimoto.gx@renesas.com, yoshihiro.shimoda.uh@renesas.com, ryusuke.sakato.bx@renesas.com, linux-sh@vger.kernel.org Subject: [PATCH 1/1] spi: Re-do correctly function name and 'ret' return value Date: Fri, 24 Apr 2015 15:40:56 +0900 Message-Id: <1429857656-8348-2-git-send-email-cm-hiep@jinso.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1429857656-8348-1-git-send-email-cm-hiep@jinso.co.jp> References: <1429857656-8348-1-git-send-email-cm-hiep@jinso.co.jp> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hiep Cao Minh qspi_trigger_transfer_out_int function should be qspi_trigger_transfer_out_in without "t". "ret" value in rspi_dma_check_then_transfer should be returned insteeds of returning zero. It just returns qspi_trigger_transfer_out_in() value in qspi_transfer_out_in(). Signed-off-by: Hiep Cao Minh --- drivers/spi/spi-rspi.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 186924a..9304a6d 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -670,7 +670,7 @@ static int rspi_dma_check_then_transfer(struct rspi_data *rspi, int ret = rspi_dma_transfer(rspi, &xfer->tx_sg, xfer->rx_buf ? &xfer->rx_sg : NULL); if (ret != -EAGAIN) - return 0; + return ret; } return -EAGAIN; @@ -724,7 +724,7 @@ static int rspi_rz_transfer_one(struct spi_master *master, return rspi_common_transfer(rspi, xfer); } -static int qspi_trigger_transfer_out_int(struct rspi_data *rspi, const u8 *tx, +static int qspi_trigger_transfer_out_in(struct rspi_data *rspi, const u8 *tx, u8 *rx, unsigned int len) { int i, n, ret; @@ -771,12 +771,8 @@ static int qspi_transfer_out_in(struct rspi_data *rspi, if (ret != -EAGAIN) return ret; - ret = qspi_trigger_transfer_out_int(rspi, xfer->tx_buf, + return qspi_trigger_transfer_out_in(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len); - if (ret < 0) - return ret; - - return 0; } static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)