Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp462527rwb; Wed, 5 Oct 2022 22:58:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4/4yRTSPh7MCMZ0J2tvO09th2GqMCWYwThm5kZf2AigDcuZ+OxU+3xdeYQc2bhnusUoDkF X-Received: by 2002:a05:6402:5256:b0:459:42b3:3d86 with SMTP id t22-20020a056402525600b0045942b33d86mr2940835edd.370.1665035902942; Wed, 05 Oct 2022 22:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665035902; cv=none; d=google.com; s=arc-20160816; b=KKDmKmmBM50vHFgygWrmIOe9MNg3nJ1edH44Tdgfta8OqKAtPHH1SA/URbMtEjeALR nBjfY+oiAwuz6ZJ68BgLa28a+kMGMwV+jxbw8+mSnIm1jtlR+4SKmdfM+fKGYny3I/KV SDwxVYHswif+JD45JTv3DsPw+X35ueT8o8O2AWazMaJJ/TZGqmnDZYDS/ReUQ2TnOLxu AqX7OEH6udQ4R7k4TX0cYZZwMsRwPpyAqDUMeo0p1h/Qstce+KmQRVWvAn3BT9jWFx5i s0UUih87FNtzt0Z91u521IhlP+gGj4Crj1XgJSF/lb1EqICTqTHQgyEIoPuE+Cnqger7 500A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=fgekk5nWHPzeoug3gkCqpW1x0qHgZeo7DP5pIN1xQMo=; b=t3OP8tP4F8v8MC9E+j6VIk168ru0svokADz9VFNUh+mH4K+FAAZAcp1yXTdXB+qFXq H2U2UXGHWa36hrVFhzURIlY6AojS5PZhQWj7mKcujPp00kpJ/rzgNUQrMxSMtz4XG/KS ffJ7llZoTrcfOlWZzfze2QRBtdBuEofJfeqBmQb+ERQBEwWW9O1rXZ8B+yVT04ON0hYm wLbS1VUZK3CAXe6ZGTyEm5g391O+EnKy7eyYDuWZpUArlIRitCohrkZ/MScOUzwbbsg0 jzdtyRJ0WkSdRvNvB6vSZb4XXYF77NRABjpdM9XVjeeNOi/GiXBdoG/kwfKdtWNwGqZb 7TDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a056402280200b0045938ab7129si10003835ede.330.2022.10.05.22.57.56; Wed, 05 Oct 2022 22:58:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiJFFRf (ORCPT + 99 others); Thu, 6 Oct 2022 01:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbiJFFRe (ORCPT ); Thu, 6 Oct 2022 01:17:34 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9BBD88A0A; Wed, 5 Oct 2022 22:17:32 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4Mjfp34SxPz9srK; Thu, 6 Oct 2022 07:17:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 35z_hFdGZ6st; Thu, 6 Oct 2022 07:17:31 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4Mjfp33ghWz9srH; Thu, 6 Oct 2022 07:17:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6EC998B765; Thu, 6 Oct 2022 07:17:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id tM3nXJFrz1BF; Thu, 6 Oct 2022 07:17:31 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.232.234]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 506578B763; Thu, 6 Oct 2022 07:17:31 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 2965HHaa210071 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 6 Oct 2022 07:17:17 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 2965HG2H210069; Thu, 6 Oct 2022 07:17:16 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Sergey Shtylyov , Damien Le Moal Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org Subject: [PATCH] ata: pata_mpc52xx: Replace NO_IRQ by 0 Date: Thu, 6 Oct 2022 07:17:07 +0200 Message-Id: X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1665033426; l=895; s=20211009; h=from:subject:message-id; bh=12wU9FoTfggJEdGbqUEhqgMOQ937NfkOCDFusslB8vk=; b=sHvicbe3G9JCIEgxLe1W1xkR+/F5vjnpanwQ7bUrnQ1b4HBSi5gcnwJXaN1mZZayL9tmhCRTTh2X yk9BhRD/DngrVtTfS7fawOKhq+OtJoRgMlYI9zhNDK3tRhwk9bDW X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org NO_IRQ is used to check the return of irq_of_parse_and_map(). On some architecture NO_IRQ is 0, on other architectures it is -1. irq_of_parse_and_map() returns 0 on error, independent of NO_IRQ. So use 0 instead of using NO_IRQ. Signed-off-by: Christophe Leroy --- drivers/ata/pata_mpc52xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index 6559b606736d..3ebd6522a1fd 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c @@ -731,7 +731,7 @@ static int mpc52xx_ata_probe(struct platform_device *op) udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1); ata_irq = irq_of_parse_and_map(op->dev.of_node, 0); - if (ata_irq == NO_IRQ) { + if (!ata_irq) { dev_err(&op->dev, "error mapping irq\n"); return -EINVAL; } -- 2.37.1