From patchwork Mon Jul 2 13:19:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10501347 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 8C3486028F for ; Mon, 2 Jul 2018 13:20:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CA3B28A5A for ; Mon, 2 Jul 2018 13:20:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70D4F28A82; Mon, 2 Jul 2018 13:20:29 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 1B5B428A97 for ; Mon, 2 Jul 2018 13:20:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752150AbeGBNU2 (ORCPT ); Mon, 2 Jul 2018 09:20:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:32776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbeGBNU2 (ORCPT ); Mon, 2 Jul 2018 09:20:28 -0400 Received: from localhost.localdomain (unknown [122.167.89.144]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E09E25D2F; Mon, 2 Jul 2018 13:20:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530537627; bh=kfHSKR6kD+3IU/UQ0BEHGZ55+rgBqBiduWryqCUgWDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w4Wdzz62dd8ar0L9+FmC8Z/jcs8v2SrVVk5GVRYGPl40ANYaeFsM5JqiSGXZ0MZg6 khh2YjGR2ks39H44YJEm8n8LkHwZ6ZKNS1ccsipdqVos8O9GqtUEbIFnqwq9nbWpsO JSCe9X76zujVFTyg+NBT0fpBBFfhUsWWz+o2sZJo= From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Robin Gong , Sascha Hauer , Lucas Stach , Vinod Koul Subject: [PATCH 3/3] dmaengine: imx-sdma: remove unused variable Date: Mon, 2 Jul 2018 18:49:39 +0530 Message-Id: <20180702131939.31481-3-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180702131939.31481-1-vkoul@kernel.org> References: <20180702131939.31481-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The variable is no longer used, though it is set, so remove it drivers/dma/imx-sdma.c:1298:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret, i, count; ^~~ Signed-off-by: Vinod Koul --- drivers/dma/imx-sdma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index dfd1fbbe7ba8..b78146b4ea01 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1295,7 +1295,7 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( { struct sdma_channel *sdmac = to_sdma_chan(chan); struct sdma_engine *sdma = sdmac->sdma; - int ret, i, count; + int i, count; int channel = sdmac->channel; struct scatterlist *sg; struct sdma_desc *desc; @@ -1318,17 +1318,14 @@ static struct dma_async_tx_descriptor *sdma_prep_slave_sg( if (count > 0xffff) { dev_err(sdma->dev, "SDMA channel %d: maximum bytes for sg entry exceeded: %d > %d\n", channel, count, 0xffff); - ret = -EINVAL; goto err_bd_out; } bd->mode.count = count; desc->chn_count += count; - if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES) { - ret = -EINVAL; + if (sdmac->word_size > DMA_SLAVE_BUSWIDTH_4_BYTES) goto err_bd_out; - } switch (sdmac->word_size) { case DMA_SLAVE_BUSWIDTH_4_BYTES: