From patchwork Tue Jul 17 13:43:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 10529439 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 150746020A for ; Tue, 17 Jul 2018 13:44:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0560C28834 for ; Tue, 17 Jul 2018 13:44:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE1D22905F; Tue, 17 Jul 2018 13:44:01 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 9961528834 for ; Tue, 17 Jul 2018 13:44:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731716AbeGQOQP (ORCPT ); Tue, 17 Jul 2018 10:16:15 -0400 Received: from mail.bootlin.com ([62.4.15.54]:40858 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731497AbeGQOQP (ORCPT ); Tue, 17 Jul 2018 10:16:15 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 1B173207B4; Tue, 17 Jul 2018 15:43:30 +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 D78FE2093C; Tue, 17 Jul 2018 15:43:19 +0200 (CEST) From: Maxime Chevallier To: Mark Brown Cc: Maxime Chevallier , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com Subject: [PATCH 4/5] spi: imx: remove unnecessary check in spi_imx_can_dma Date: Tue, 17 Jul 2018 15:43:10 +0200 Message-Id: <20180717134311.26780-5-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180717134311.26780-1-maxime.chevallier@bootlin.com> References: <20180717134311.26780-1-maxime.chevallier@bootlin.com> 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 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 --- 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;