Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1039878rwb; Thu, 6 Oct 2022 07:46:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7K27nJYjSzKqaUEBreeALpyFcnzZ+5PeRmRkwGNzQU7KDUyFVU+V+aBWrMJLlpU4CEJW+p X-Received: by 2002:a63:f349:0:b0:43a:b82b:1173 with SMTP id t9-20020a63f349000000b0043ab82b1173mr234713pgj.534.1665067598813; Thu, 06 Oct 2022 07:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665067598; cv=none; d=google.com; s=arc-20160816; b=TZ3WYJZ/67p9ijAbbndFPsbGxTSTDZZ2ZQQfyprEGNiquzfe9lZp3R5/MtSePkP4LI MW/qEB041BaMNDnfv4K8N7SBDqxnlrJMseQdKC1HKJx+Ai4UWW9nMOlZvu2BXAejyhwV 0NrMUkr41YgfGM+a5kDLca/ZA2odSdHAPIMLYHD4bJIjB/bcPLJ6JvtMnt4gfmG0FZ/Q 7cTP2n1eP1LKVMuFfyt317hAKBjMUJOcL2HKmRNiNy3KhX+NOfSz8HnViIWug1zkSeyb 9fji/3uxzSYdEcPJ2LDIKVuEi1rABwEqI9B5SvyAtth3d52iyIVhrgIWfO2UxWPvQFvy rp0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+0EoLOuzxqeyGOCY+aaOCjPE/1GiKVIPqQzfx+//HUk=; b=tw75+mjOstZEF0QhJ4RkgabeJBiEyTxRRdZ/VEPGx3zzdu4ykiBzlD/eTlFV7aKzp5 EBAPyAAPi59Se7X28/pa0LX/zKKnQO6RL5j2F2P/Xt4Ccrcb9oYJNCfjojjp4FFjdLv8 +hmVTKfSDs+sMM+YJ/tj/hvVKilK0akdGvojTNFjJDxMN8lB6oqqGReTV/ZeE3eKiFGL zifEbZdxIt3BOs8rDWmk+Dm7zvup88Pka5ibHVjVlNoAZXPDVoZzCd2WvJDyOvBgBNKI Z/0KQc6nfrP4JnfyzNo0ecKR0Q5IOyx0X/Mfb8MMVsSOdc21krxnF/mlCcy9BVmRr0qG rK/Q== 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 n12-20020a170902d2cc00b001751d0ac52asi21131861plc.435.2022.10.06.07.46.24; Thu, 06 Oct 2022 07:46:38 -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 S230362AbiJFOYu (ORCPT + 99 others); Thu, 6 Oct 2022 10:24:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiJFOYq (ORCPT ); Thu, 6 Oct 2022 10:24:46 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 78DD21C422 for ; Thu, 6 Oct 2022 07:24:43 -0700 (PDT) Received: (qmail 787496 invoked by uid 1000); 6 Oct 2022 10:24:42 -0400 Date: Thu, 6 Oct 2022 10:24:42 -0400 From: Alan Stern To: Christophe Leroy Cc: Greg Kroah-Hartman , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: Re: [PATCH] usb: Replace NO_IRQ by 0 Message-ID: References: <63f6d2e7ea17f6522f36abd6cf5e6a7f25f215c6.1665033267.git.christophe.leroy@csgroup.eu> <0d2056d8-ed12-88d3-b9c1-d6c1e772dcf3@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0d2056d8-ed12-88d3-b9c1-d6c1e772dcf3@csgroup.eu> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS autolearn=no 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 On Thu, Oct 06, 2022 at 02:01:57PM +0000, Christophe Leroy wrote: > > > Le 06/10/2022 ? 15:50, Alan Stern a ?crit?: > > On Thu, Oct 06, 2022 at 07:15:44AM +0200, Christophe Leroy wrote: > >> 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. > > > > This isn't clear. Does absence of an irq count as an error? In other > > words, will irq_of_parse_and_map() sometimes return 0 and other times > > return NO_IRQ? What about architectures on which 0 is a valid irq > > number? > > NO_IRQ doesn't exist anywhere in core functions. Only some drivers and > some architectures have relics of it. > > irq_of_parse_and_map() will always return 0 on error. > > 0 can't be a valid logical IRQ number. It may only be a valid hwirq > number but it will always be translated to a non-zero logical irq number. > > I'm trying to get rid of NO_IRQ completely in powerpc code, therefore > trying to clean-up all drivers used by powerpc architecture. > > Long time ago Linus advocated for not using NO_IRQ, see > https://lkml.org/lkml/2005/11/21/221 Okay, good. Please resubmit the patch and include some of these things in the patch description. Alan Stern