From patchwork Tue Jul 17 14:31:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 10529633 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 8EB3C6020A for ; Tue, 17 Jul 2018 14:33:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79D1D2911A for ; Tue, 17 Jul 2018 14:33:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DB1029128; Tue, 17 Jul 2018 14:33:06 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2EE282911A for ; Tue, 17 Jul 2018 14:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=u5m9bNrMZLWCHTQCG4dMJ0/UZAxOkLHkkaGFzTFm3YY=; b=cKpk5ul5gnuYJXHPKDyao2xnF5 3RV8ETMI+ScZkGjxh+zgucf5obPjqweC+LshVDzhoPt6mz+XP10WXjPsX0M3hEuyOw9muue93YWls gmeoFBlAnsXkHPzS88ZPvbjI8blRhlAc9T2OQTFxN+nWp8XEyPTSKKLfz40tff0MitBy+eQCRwjAk D2rwfeCS479543qYj3+cBTY9vDzWZZoD3yL1QnK4o3Exsv/MxiXicl7ma1VNXQTriu3CTEpStyPyu Z1j+oh4lPK5Bh4+5ZFHR8/DAVjz0SVG5seGR6RrX/diWE0xnWpIcopd+L/RfWHnnQmns1E8/xxTQ3 8IEHW0iw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ffR2E-0005L7-Su; Tue, 17 Jul 2018 14:33:02 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ffR1W-0004aI-E4 for linux-arm-kernel@lists.infradead.org; Tue, 17 Jul 2018 14:32:21 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 9FE19206F3; Tue, 17 Jul 2018 16:32:15 +0200 (CEST) Received: from mc-bl-xps13.lan (AAubervilliers-681-1-27-161.w90-88.abo.wanadoo.fr [90.88.147.161]) by mail.bootlin.com (Postfix) with ESMTPSA id 81ED8207B4; Tue, 17 Jul 2018 16:31:58 +0200 (CEST) From: Maxime Chevallier To: Mark Brown Subject: [PATCH RESEND 4/5] spi: imx: remove unnecessary check in spi_imx_can_dma Date: Tue, 17 Jul 2018 16:31:53 +0200 Message-Id: <20180717143154.28241-5-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180717143154.28241-1-maxime.chevallier@bootlin.com> References: <20180717143154.28241-1-maxime.chevallier@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180717_073218_635276_5EB3B5FA X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, thomas.petazzoni@bootlin.com, Sascha Hauer , linux-kernel@vger.kernel.org, Maxime Chevallier , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-spi@vger.kernel.org, Shawn Guo , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The spi_imx_can_dma function computes the watermark level so that the transfer will fit in exactly N bursts (without a remainder). The smallest watermark level possible being one FIFO entry per burst, we can't never have a case where the transfer size isn't divsiible by 1. Remove the extra check for the wml being different than 0. Signed-off-by: Maxime Chevallier Reviewed-by: Sascha Hauer --- drivers/spi/spi-imx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 3ae706dac660..ef6d3648396a 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -229,9 +229,6 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi, break; } - if (i == 0) - return false; - spi_imx->wml = i; spi_imx->dynamic_burst = 0;