From patchwork Fri Sep 2 23:01:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9311771 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 5E3C460760 for ; Fri, 2 Sep 2016 23:01:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47A6829881 for ; Fri, 2 Sep 2016 23:01:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39A9A29884; Fri, 2 Sep 2016 23:01:30 +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=-5.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 9DF5629881 for ; Fri, 2 Sep 2016 23:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752051AbcIBXB2 (ORCPT ); Fri, 2 Sep 2016 19:01:28 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:64769 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbcIBXB2 (ORCPT ); Fri, 2 Sep 2016 19:01:28 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0M4Vjc-1asgkv3INQ-00yl6l; Sat, 03 Sep 2016 01:00:57 +0200 From: Arnd Bergmann To: Vinod Koul Cc: Markus Pargmann , Arnd Bergmann , Dan Williams , Dave Jiang , Lars-Peter Clausen , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: mxs: remove NO_IRQ check Date: Sat, 3 Sep 2016 01:01:06 +0200 Message-Id: <20160902230115.1239746-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:0Z3RtgbH262YojTmjrmgxmj0NizUoH0auHbX0GXX+yL/O3hdKDC vGa5Qd9gldhLZ2pGgvV1eYRrMQ1yRMDq4zIsz2Om/QQ6ctinetXCHdI5xsTC+qcA3cfSqEz B8/5ltvQWUDRl6JknGSny9bPHps4xhkNNdrRLgL2NWjWkmxRohif77C99k0qmC536i+0xpA 2damU51lYHHR4CjmWk9yw== X-UI-Out-Filterresults: notjunk:1; V01:K0:VOlGFyttvBE=:EEiVafNUJmwm4nKAojXe9O ULFLQ5Hk9ODNGYIjvsRRHlMVaExb1ICfOi5Ta8+jkXqAqDzqOuzuisaJIsUgUkJNzQzBqevdY TeGyspDQ00lLun0eOACIWBzDaU6d7wbMadTnfa9cfqxiaMTmo5bbwkaxRB103qfCsS9drPP3V be1dqDiEKmCGla7DC/2MAD9oSrvKmcT1/N2SC+rAemsEFd3vR1k9lodFiiocjZGBauLx5wXor Xg+Hyju52BU/y3M9WRRPnrYFTjj7a2mT1tDg3cGv6N+ygtvUS50jbcrMkkctmMkMLi06rQFN+ pEoXdnxNwsp8ntmPx7sPdiJTYzekUhEInoieMStpc487443tbbY8hpsB4u3HtcEnzsndZtXjs ZpbA+VB0DN2AewUPdjhjquH/19P6its70dQ4AfCuk6uXJTFcX7SDz50jZmU+7sc9R78uYMuYj RgvXItvErsGYBPC2gbZZJQSUWyFdGPS7ICHlJHqWIYRnG4NZqN/lOUuNdlvm8RnM+I0KSjdDf VBu6jSPRZXafw1BtFQrxpu5ccQTBG/l84OVQyiZEqsJDa05Rv883FS3bx8Qt4pFuGHEqMdHRT nsGkD4SEQuC4omlkBhuF/LtD+uls3pQjK6OafSDk2UNRjy5JLqgdcUhiWzWfnDa7Iqws2kLL6 kl9R+lsucl2X1LDvEuhCyzRAmpr99wb+jK9OlNRN5d/Ff56ck758zK3q0PTVbKo3v0vc= Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The mxs_chan->chan_irq variable is guaranteed to never be NO_IRQ, as it gets assigned the result of platform_get_irq() that returns either a valid positive interrupt number, or a negative failure code that leads to the channel not being used. This removes the redundant check, eliminating one more instance of NO_IRQ. Signed-off-by: Arnd Bergmann --- drivers/dma/mxs-dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 50e64e113ffb..e217268c7098 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -428,12 +428,10 @@ static int mxs_dma_alloc_chan_resources(struct dma_chan *chan) goto err_alloc; } - if (mxs_chan->chan_irq != NO_IRQ) { - ret = request_irq(mxs_chan->chan_irq, mxs_dma_int_handler, - 0, "mxs-dma", mxs_dma); - if (ret) - goto err_irq; - } + ret = request_irq(mxs_chan->chan_irq, mxs_dma_int_handler, + 0, "mxs-dma", mxs_dma); + if (ret) + goto err_irq; ret = clk_prepare_enable(mxs_dma->clk); if (ret)