From patchwork Fri Sep 2 23:26:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9311785 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 E680960772 for ; Fri, 2 Sep 2016 23:26:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7D272987D for ; Fri, 2 Sep 2016 23:26:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A58EE29883; Fri, 2 Sep 2016 23:26:49 +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=-6.9 required=2.0 tests=BAYES_00,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 253A52987D for ; Fri, 2 Sep 2016 23:26:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbcIBX0r (ORCPT ); Fri, 2 Sep 2016 19:26:47 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:51801 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752666AbcIBX0q (ORCPT ); Fri, 2 Sep 2016 19:26:46 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MYvrP-1bbPQS1tZb-00Vgqu; Sat, 03 Sep 2016 01:26:31 +0200 From: Arnd Bergmann To: Herbert Xu Cc: Romain Perier , Boris Brezillon , Arnaud Ebalard , Thomas Petazzoni , Arnd Bergmann , "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] crypto: mv_cesa: remove NO_IRQ reference Date: Sat, 3 Sep 2016 01:26:40 +0200 Message-Id: <20160902232648.2119621-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:3BWoGsRlF+rnu2KsX9aqjj0IkvB3P5vdCeAqyZQ2wOnj3sCLcTt cMwKFlRGijQET+eBeifiGRYoKtKZF9xJ5rRG0cu2XQkuPO6dTMRLRJowXiblFydZKcozAou 6WU/l+J1xSkmoYCoh4C2Al96IpWQHgZMCkri18HdN/Jk7YBzGOpPzJtR9FfRfjnS8Z8XCno 5Js8O+MwA9YEZD8tdSrBw== X-UI-Out-Filterresults: notjunk:1; V01:K0:pi6oSkkamcg=:g5Rh7O3kMJkAZNLw10AfDC 6smvYJ7eTQl/L2MO6wcFPbSdeS3vaaj2EDpk9miSWwH8k175ISuMgfExQYTptfPBMRq7I3yEI 5ECN9WqUXNoDRTvKMG/u9ZDRlAdQ9JLerZ0ZThCqTADkQyjsUrGhUdgG2YUNjwUqIQ0acmsYU j5SW/Y5uOXG55i5GEp2nnn7XVd/Y9/k7VWkAoGlQ8XolpjDCDtc4tUUIVvaDzAMIBi90XNtQn MWlp3RL3d30kV8HQT9c1fGx4Ols8nomDXyr22MlSUcQMRhFDYLd+3d9mRTtaBZrV7sdDtzuIt GXQyb3hgg1iU7OZoBrnzT8MEDF0NJ91fLfNyyZARN3IVDuhN85VmpiBMiRlLyemQdsXbvjFoB +UIsMx3x1Iu9rpK02wlOLboWDo/besyeqxbdQZ2ky8Mc3cQI89jr/+l7pxWPHllIgoFXKIAPG 3uTCwYsAvHt96mFVtJv/peF1XfRHMXTQWcX+THGMRCBUNMiS+g4YhDTMIRDouQBY6cIb00E0b cCHLx5Ouwa9sGvkMH7y8yLuvmyzFW+wiNZoW45tCbuYPbnqNcuNE2pnXc8mWdoKOlqhaOKJKZ thTwX1etH/5eRyOXLfKyzwdHFduAWXemiYCG23anT3iYVJfl6OJaE/Bv/ObgP5drBauPYqtH+ MI236j0Icu+eP2FYYDoFmOkuaYcgckJv7+eSgMZUTWfUKAQ7Sg+/RzfMwjghBSTQNA6I= Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }