From patchwork Mon Dec 5 12:10:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 9460913 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 7C57760236 for ; Mon, 5 Dec 2016 12:11:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7099825D9E for ; Mon, 5 Dec 2016 12:11:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6583F27C0C; Mon, 5 Dec 2016 12:11:42 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 DEB0727BE5 for ; Mon, 5 Dec 2016 12:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751686AbcLEMLM (ORCPT ); Mon, 5 Dec 2016 07:11:12 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:40030 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbcLEMKK (ORCPT ); Mon, 5 Dec 2016 07:10:10 -0500 Received: from [81.145.183.37] (helo=finisterre) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cDs5r-0002Xt-LZ; Mon, 05 Dec 2016 12:10:05 +0000 Received: from broonie by finisterre with local (Exim 4.88) (envelope-from ) id 1cDs5o-0003wF-Mn; Mon, 05 Dec 2016 12:10:00 +0000 From: Mark Brown To: Gao Pan Cc: Mark Brown , broonie@kernel.org, linux-spi@vger.kernel.org, pandy.gao@nxp.com, linux-spi@vger.kernel.org In-Reply-To: <1480650601-12810-2-git-send-email-pandy.gao@nxp.com> Message-Id: Date: Mon, 05 Dec 2016 12:10:00 +0000 X-SA-Exim-Connect-IP: 81.145.183.37 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Applied "spi: fsl-lpspi: quit reading rx fifo under error condition" to the spi tree X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: No (on mezzanine.sirena.org.uk); Unknown failure Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch spi: fsl-lpspi: quit reading rx fifo under error condition has been applied to the spi tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From d989eed20791534dc624c7b29568b263c67a286f Mon Sep 17 00:00:00 2001 From: Gao Pan Date: Fri, 2 Dec 2016 11:50:01 +0800 Subject: [PATCH] spi: fsl-lpspi: quit reading rx fifo under error condition In case that error occurs during waiting for txfifo empty, it is not necessary to read rx fifo. It's better to return directly. Signed-off-by: Gao Pan Signed-off-by: Mark Brown --- drivers/spi/spi-fsl-lpspi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c index c4a4e2622a53..52551f6d0c7d 100644 --- a/drivers/spi/spi-fsl-lpspi.c +++ b/drivers/spi/spi-fsl-lpspi.c @@ -350,9 +350,12 @@ static int fsl_lpspi_transfer_one(struct spi_master *master, } ret = fsl_lpspi_txfifo_empty(fsl_lpspi); + if (ret) + return ret; + fsl_lpspi_read_rx_fifo(fsl_lpspi); - return ret; + return 0; } static int fsl_lpspi_transfer_one_msg(struct spi_master *master,