From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753118AbcICGyc (ORCPT ); Sat, 3 Sep 2016 02:54:32 -0400 Received: from down.free-electrons.com ([37.187.137.238]:37741 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751365AbcICGyb (ORCPT ); Sat, 3 Sep 2016 02:54:31 -0400 Date: Sat, 3 Sep 2016 08:54:27 +0200 From: Boris Brezillon To: Arnd Bergmann Cc: Herbert Xu , Romain Perier , Arnaud Ebalard , Thomas Petazzoni , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: mv_cesa: remove NO_IRQ reference Message-ID: <20160903085427.1e0285de@bbrezillon> In-Reply-To: <20160902232648.2119621-1-arnd@arndb.de> References: <20160902232648.2119621-1-arnd@arndb.de> Organization: Free Electrons X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 3 Sep 2016 01:26:40 +0200 Arnd Bergmann wrote: > Drivers should not use NO_IRQ, as we are trying to get rid of that. > In this case, the call to irq_of_parse_and_map() is both wrong > (as it returns '0' on failure, not NO_IRQ) and unnecessary > (as platform_get_irq() does the same thing) > > This removes the call to irq_of_parse_and_map() and checks for > the error code correctly. > > Signed-off-by: Arnd Bergmann Acked-by: Boris Brezillon > --- > drivers/crypto/mv_cesa.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > It would be good if someone could test this on a machine that boots > from DT to ensure the conversion was correct. > > diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c > index e6b658faef63..104e9ce9400a 100644 > --- a/drivers/crypto/mv_cesa.c > +++ b/drivers/crypto/mv_cesa.c > @@ -1091,11 +1091,8 @@ static int mv_probe(struct platform_device *pdev) > > cp->max_req_size = cp->sram_size - SRAM_CFG_SPACE; > > - if (pdev->dev.of_node) > - irq = irq_of_parse_and_map(pdev->dev.of_node, 0); > - else > - irq = platform_get_irq(pdev, 0); > - if (irq < 0 || irq == NO_IRQ) { > + irq = platform_get_irq(pdev, 0); > + if (irq < 0) { > ret = irq; > goto err; > }