Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp482431rwb; Wed, 5 Oct 2022 23:19:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+OlX0lHaOvgTuqOy6ylJSfB0blMYiMHEAjxwlUJioAKKM1AP56RZ9F0YGYa8TK6IFGGU4 X-Received: by 2002:a05:6a00:1884:b0:562:6536:4844 with SMTP id x4-20020a056a00188400b0056265364844mr3480419pfh.2.1665037151032; Wed, 05 Oct 2022 23:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665037151; cv=none; d=google.com; s=arc-20160816; b=hRYJ/YXCEoSKl05HcdPhNlfxAZEXC3EXvKa7E+iKcH4QNavzhAr25L1gAHoPClG/OC N+vkR6Y+uA2W1vvuYA+VraYA2acoK7gmoePAC4fFr3DnlkDn4hAfwnCruotR+uCrbpii D8CDe5xPwyzvm9xD6IAGvfMcqEM82y2D0n4XM6u8LCbODk1qmtpCJs5L+TUMxJWh5Mai j6ngOxi6e3DXJJZ17ISLXQr5BHGxafjp0Z/sUA5nKPiXL+l9oJ9EcGUV3GMjewVbUpIH GmwoW52aEhv0BWuOL612ANqXvUphNuEcTwImvQqs1H3WOz47bRuG+64m8HDGw1r0RtCj O2Ww== 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=l8lVoWHXpDN93ttkw8nDy0fBDdOnpDBrqy0eSCK1tsk=; b=NisK6M6meIb22AYuWjQf2U70hHzOkfLpgIcEAwKAZnPWmahwp6rveepAuNy1zilgTz Zl1PBTc7EBRHcxNOHQT9yIfJ+p/028RsvzZU/HZXMOL5v3jFhD47/BFgZm09Cs70KU+9 zpuIWrNqmhToUwihDcEW8HspbJrVobZzOnSf50+uJGM1+UwTa9f/xvGskTu0Q+Oys9Xl 6TAEb9KGk8KAaZX2gyYRx5v8s1QaG7LkW13A3cQwaB6maPPFAKQ9Y6gptSB1juwvxjpa 6N4JfY93JBCVbOnCqh9sLVGYVgawZI6yhT6/jF8JQLd0W952Li8ZUswAguNbrHHqsmXD 3vTQ== 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 t18-20020a63d252000000b0041b7be8ef1csi19280128pgi.219.2022.10.05.23.18.57; Wed, 05 Oct 2022 23:19:11 -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 S229956AbiJFFcW (ORCPT + 99 others); Thu, 6 Oct 2022 01:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230059AbiJFFcU (ORCPT ); Thu, 6 Oct 2022 01:32:20 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A5F18A7CB; Wed, 5 Oct 2022 22:32:17 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4Mjg7365n6z9srM; Thu, 6 Oct 2022 07:32:15 +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 BBw-GaoHTb0D; Thu, 6 Oct 2022 07:32:15 +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 4Mjg735Bf1z9srL; Thu, 6 Oct 2022 07:32:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 98B568B765; Thu, 6 Oct 2022 07:32:15 +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 7mp3JBzDTH5l; Thu, 6 Oct 2022 07:32:15 +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 6A8DC8B763; Thu, 6 Oct 2022 07:32:15 +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 2965W12r212478 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 6 Oct 2022 07:32:01 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 2965W0BI212477; Thu, 6 Oct 2022 07:32:00 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Finn Thain , Michael Schmitz , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: [PATCH] scsi: mac_scsi: Replace NO_IRQ by 0 Date: Thu, 6 Oct 2022 07:32:00 +0200 Message-Id: X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1665034319; l=1720; s=20211009; h=from:subject:message-id; bh=eXtfh1J1qDXaXAXSJZOMjCbd65v9KlkYmL7nMCnCJQk=; b=VP7cTuxbFIB/m12IaWne/FUOukr8uNjLZCtd9xWgumlb+8TaXaNE/njuxGRXqeFiybaQ3t1sS8lI 4i5UWsKQD1rLQCBLopHbjaPN85QE0u6iFkwuavgk7QjSfUh3/fzZ 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/scsi/mac_scsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index 2e511697fce3..e4df2b501e8b 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c @@ -478,7 +478,7 @@ static int __init mac_scsi_probe(struct platform_device *pdev) if (irq) instance->irq = irq->start; else - instance->irq = NO_IRQ; + instance->irq = 0; hostdata = shost_priv(instance); hostdata->base = pio_mem->start; @@ -495,7 +495,7 @@ static int __init mac_scsi_probe(struct platform_device *pdev) if (error) goto fail_init; - if (instance->irq != NO_IRQ) { + if (instance->irq) { error = request_irq(instance->irq, macscsi_intr, IRQF_SHARED, "NCR5380", instance); if (error) @@ -514,7 +514,7 @@ static int __init mac_scsi_probe(struct platform_device *pdev) return 0; fail_host: - if (instance->irq != NO_IRQ) + if (instance->irq) free_irq(instance->irq, instance); fail_irq: NCR5380_exit(instance); @@ -528,7 +528,7 @@ static int __exit mac_scsi_remove(struct platform_device *pdev) struct Scsi_Host *instance = platform_get_drvdata(pdev); scsi_remove_host(instance); - if (instance->irq != NO_IRQ) + if (instance->irq) free_irq(instance->irq, instance); NCR5380_exit(instance); scsi_host_put(instance); -- 2.37.1