From patchwork Tue Jul 3 00:58:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 10502747 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 8B3346028F for ; Tue, 3 Jul 2018 00:58:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B0F7289E9 for ; Tue, 3 Jul 2018 00:58:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F7C328A01; Tue, 3 Jul 2018 00:58:51 +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 555CC289E9 for ; Tue, 3 Jul 2018 00:58:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753499AbeGCA6u (ORCPT ); Mon, 2 Jul 2018 20:58:50 -0400 Received: from mail-eopbgr40061.outbound.protection.outlook.com ([40.107.4.61]:31990 "EHLO EUR03-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752789AbeGCA6t (ORCPT ); Mon, 2 Jul 2018 20:58:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=abPD8JG/RmlxwtRevhL2fEGb0xfd39bCRVNUjJVTPco=; b=foeG3GaYoOZNZTkGbcR3tUwBdn1LEGDkwMc3Ng2uJn0dCuyyl8lHTG1zGTypHPQFyeVDq2HB+8cLBClfKF7qKu3C+hQ2PM5unU0WYWjT3mdJwfaSZbjSzV4HT//AWMQ9+OHSw9ye+JQIoUvBdUTriQleW9IrF1e2UhINglDjpe4= Received: from DB6PR04MB3223.eurprd04.prod.outlook.com (10.170.211.19) by DB6PR04MB2951.eurprd04.prod.outlook.com (10.170.212.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.26; Tue, 3 Jul 2018 00:58:47 +0000 Received: from DB6PR04MB3223.eurprd04.prod.outlook.com ([fe80::982d:7c4d:d525:42f9]) by DB6PR04MB3223.eurprd04.prod.outlook.com ([fe80::982d:7c4d:d525:42f9%5]) with mapi id 15.20.0906.026; Tue, 3 Jul 2018 00:58:46 +0000 From: Robin Gong To: Vinod Koul , "dmaengine@vger.kernel.org" CC: Sascha Hauer , Lucas Stach Subject: RE: [PATCH 3/3] dmaengine: imx-sdma: remove unused variable Thread-Topic: [PATCH 3/3] dmaengine: imx-sdma: remove unused variable Thread-Index: AQHUEgd06ePykYjR5kyfVffj7dOKwaR8rbCw Date: Tue, 3 Jul 2018 00:58:46 +0000 Message-ID: References: <20180702131939.31481-1-vkoul@kernel.org> <20180702131939.31481-3-vkoul@kernel.org> In-Reply-To: <20180702131939.31481-3-vkoul@kernel.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB6PR04MB2951; 7:eBayr11UJhAXXJAHQOtmiXf4O9QOkOu1I2A7k4ceUc7SCQ4pxHv+zmHKI6Yav8FPPXKsbwP/r3HQ6ppXhlxVX9xrkhJE9gcRbosdgCZDy/R/pelLlJKIiJRKlViaH5witjbQqgiu7iwm9XU538UAlX1fZh0B3sHgXrcRROwFfoEOIkHhDryKxS6OKcqWpjgfc1bwV3EjraN0VS3wgT7aKPYUhXg4tGm8HAKlhjXv4sXnm+yfr9OcZPBnGJF1bIjX x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 41b33727-aa84-481c-960f-08d5e08021c7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:DB6PR04MB2951; x-ms-traffictypediagnostic: DB6PR04MB2951: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DB6PR04MB2951; BCL:0; PCL:0; RULEID:; SRVR:DB6PR04MB2951; x-forefront-prvs: 0722981D2A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(376002)(366004)(136003)(39860400002)(346002)(13464003)(199004)(189003)(7696005)(9686003)(55016002)(2900100001)(6246003)(6116002)(105586002)(106356001)(76176011)(8936002)(3846002)(2906002)(305945005)(7736002)(6436002)(478600001)(229853002)(74316002)(14454004)(81166006)(81156014)(8676002)(53546011)(68736007)(66066001)(186003)(476003)(11346002)(446003)(316002)(486006)(2501003)(99286004)(86362001)(26005)(5660300001)(53936002)(110136005)(5250100002)(4326008)(54906003)(6506007)(33656002)(256004)(25786009)(102836004)(14444005)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR04MB2951; H:DB6PR04MB3223.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 0dXKwWPZm6uI0LEI6CmpsmJ//3OJqzx/iulzmA1/nEs5O77kB/rBUljpUUuOawCGl5gJpTzzieb8z9W+NxqI9QzIfFYxw1XIawrHJvKglKDyaPkTEz9oVUbCcqy58M4nPAfpxUCrX0oqZiCoffYslfUZNSgWR0NgKb4LGeEDfdEB0/QrVTTAhu64gnzVTPbdveU9DAKgTHXerYgm0AQovoTUY+wR8iC47172fQ+acm5VeSchpu7QrCe7kJjhvgr54O4zQlR5Tb4BgGawIoeRsGlfmtJBGx8fPXnobMT1JRvrJp8NuIQke4Tw8nXYKavJFxa/WnY9PT2RHRYjKJKcCdlODuUF+XuUwLTZ7rFwB4g= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 41b33727-aa84-481c-960f-08d5e08021c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jul 2018 00:58:46.9456 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB2951 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Acked-by: Robin Gong -----Original Message----- From: Vinod Koul [mailto:vkoul@kernel.org] Sent: 2018年7月2日 21:20 To: dmaengine@vger.kernel.org Cc: Robin Gong ; Sascha Hauer ; Lucas Stach ; Vinod Koul Subject: [PATCH 3/3] dmaengine: imx-sdma: remove unused variable 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(-) 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: -- 2.14.4 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(