From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A28DC2BB1D for ; Thu, 12 Mar 2020 09:53:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD95920739 for ; Thu, 12 Mar 2020 09:53:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbgCLJxJ (ORCPT ); Thu, 12 Mar 2020 05:53:09 -0400 Received: from ns.iliad.fr ([212.27.33.1]:45676 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbgCLJxJ (ORCPT ); Thu, 12 Mar 2020 05:53:09 -0400 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 33704204CB; Thu, 12 Mar 2020 10:53:07 +0100 (CET) Received: from [192.168.108.51] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 045E820046; Thu, 12 Mar 2020 10:53:07 +0100 (CET) Subject: Re: [PATCH 4/5] pci: handled return value of platform_get_irq correctly To: Aman Sharma , Lorenzo Pieralisi , Bjorn Helgaas Cc: Thomas Petazzoni , Andrew Murray , Linus Walleij , Ryder Lee , Karthikeyan Mitran , Hou Zhiqiang , Mans Rullgard , Matthias Brugger , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org References: From: Marc Gonzalez Message-ID: <6e413f63-06e3-9613-97dc-ff5968a4f759@free.fr> Date: Thu, 12 Mar 2020 10:53:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Mar 12 10:53:07 2020 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/03/2020 20:19, Aman Sharma wrote: > diff --git a/drivers/pci/controller/pcie-tango.c b/drivers/pci/controller/pcie-tango.c > index 21a208da3f59..18c2c4313eb5 100644 > --- a/drivers/pci/controller/pcie-tango.c > +++ b/drivers/pci/controller/pcie-tango.c > @@ -273,9 +273,9 @@ static int tango_pcie_probe(struct platform_device *pdev) > writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset); > > virq = platform_get_irq(pdev, 1); > - if (virq <= 0) { > + if (virq < 0) { > dev_err(dev, "Failed to map IRQ\n"); > - return -ENXIO; > + return virq; > } > > irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie); Weee, here we go again :-) https://patchwork.kernel.org/patch/11066455/ https://patchwork.kernel.org/patch/10006651/ Last time around, my understanding was that, going forward, the best solution was: virq = platform_get_irq(...) if (virq <= 0) return virq ? : -ENODEV; i.e. map 0 to -ENODEV, pass other errors as-is, remove the dev_err @Bjorn/Lorenzo did you have a change of heart? Regards. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21F9BC10DCE for ; Thu, 12 Mar 2020 09:53:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F342720736 for ; Thu, 12 Mar 2020 09:53:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sv0M7gn/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F342720736 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bQsWpKOWNSt0U9trNRfk2daD9dvLv9biiPot7rcfHP8=; b=sv0M7gn/wKEroS IkBwL+NQo2UWuby9aSBpNyYe/G9hJwJTbfjy5Y45uSL7z2eIlH60UoBHi5Xp/LUm/8XwvKZAQaw4Y YoEWaeMdhjrTu/CjahDf+Q65Q9d56/9njCl9DxoblCfWenGXMaOSxg2ShYqShteqQps+nBDYRi4wF t5kJpvb0qIhs37V6BoSrEJFsCx1jm1vI1EA4oTXIbNnLnT1mXgttAD99bdWWMu3PpgENvAcRxeXcw qdvHzhm9m95+aBIemYr/dImPgqbXCXZOJTP4JB9BQeC+QlEDdyqSeYCB11nZvXX4D/raZOLKdpTQD v8iYGnTMmiyn8cydBPBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCKWo-0001lw-Vm; Thu, 12 Mar 2020 09:53:23 +0000 Received: from ns.iliad.fr ([212.27.33.1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCKWg-0001d0-61; Thu, 12 Mar 2020 09:53:16 +0000 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 33704204CB; Thu, 12 Mar 2020 10:53:07 +0100 (CET) Received: from [192.168.108.51] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 045E820046; Thu, 12 Mar 2020 10:53:07 +0100 (CET) Subject: Re: [PATCH 4/5] pci: handled return value of platform_get_irq correctly To: Aman Sharma , Lorenzo Pieralisi , Bjorn Helgaas References: From: Marc Gonzalez Message-ID: <6e413f63-06e3-9613-97dc-ff5968a4f759@free.fr> Date: Thu, 12 Mar 2020 10:53:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Mar 12 10:53:07 2020 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200312_025314_375515_8DB0E352 X-CRM114-Status: GOOD ( 11.31 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryder Lee , Karthikeyan Mitran , linux-pci@vger.kernel.org, Linus Walleij , linux-kernel@vger.kernel.org, Mans Rullgard , linux-mediatek@lists.infradead.org, Thomas Petazzoni , Matthias Brugger , Hou Zhiqiang , linux-arm-kernel@lists.infradead.org, Andrew Murray Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 11/03/2020 20:19, Aman Sharma wrote: > diff --git a/drivers/pci/controller/pcie-tango.c b/drivers/pci/controller/pcie-tango.c > index 21a208da3f59..18c2c4313eb5 100644 > --- a/drivers/pci/controller/pcie-tango.c > +++ b/drivers/pci/controller/pcie-tango.c > @@ -273,9 +273,9 @@ static int tango_pcie_probe(struct platform_device *pdev) > writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset); > > virq = platform_get_irq(pdev, 1); > - if (virq <= 0) { > + if (virq < 0) { > dev_err(dev, "Failed to map IRQ\n"); > - return -ENXIO; > + return virq; > } > > irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie); Weee, here we go again :-) https://patchwork.kernel.org/patch/11066455/ https://patchwork.kernel.org/patch/10006651/ Last time around, my understanding was that, going forward, the best solution was: virq = platform_get_irq(...) if (virq <= 0) return virq ? : -ENODEV; i.e. map 0 to -ENODEV, pass other errors as-is, remove the dev_err @Bjorn/Lorenzo did you have a change of heart? Regards. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50575C1975A for ; Thu, 12 Mar 2020 09:53:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EF6720736 for ; Thu, 12 Mar 2020 09:53:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uUaLc/IR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EF6720736 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dYS3kVr2tuhUu4LHwr315aU6CT84/7ECK91aWWboo1c=; b=uUaLc/IRKSkheE 3hQeK6gZp6dAccW+qVmCMlm7V7VOK18Kwfc2k5fZF/WpvyrlpLYCnqrknoKsX1aeDEk52IhSNtG7/ y/Dw8NKrorFcrqYov6MYWoIf4rJkpoIVFKYyhlU1JpPLHnTQjqMy8qqhFr6ulCp4yk3hu0HUt1nvh p08EL2fKp1niHXaQGa5kyyIcogedLFUTTIHNJ3dXZ5UEvLiU8NsPM0zhLHQKwp/5ueh4EHNE0MHDp sKsU0+iNb8PXhcaQwGYUQSc7dCy3xyFVX8MYbdkO/uMEh5s3QpR9w87UR/AZXlaAKevuBzmG/JIsw HdWojowDPa6ftHWUPssg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCKWj-0001e9-CC; Thu, 12 Mar 2020 09:53:17 +0000 Received: from ns.iliad.fr ([212.27.33.1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jCKWg-0001d0-61; Thu, 12 Mar 2020 09:53:16 +0000 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 33704204CB; Thu, 12 Mar 2020 10:53:07 +0100 (CET) Received: from [192.168.108.51] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 045E820046; Thu, 12 Mar 2020 10:53:07 +0100 (CET) Subject: Re: [PATCH 4/5] pci: handled return value of platform_get_irq correctly To: Aman Sharma , Lorenzo Pieralisi , Bjorn Helgaas References: From: Marc Gonzalez Message-ID: <6e413f63-06e3-9613-97dc-ff5968a4f759@free.fr> Date: Thu, 12 Mar 2020 10:53:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Mar 12 10:53:07 2020 +0100 (CET) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200312_025314_375515_8DB0E352 X-CRM114-Status: GOOD ( 11.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryder Lee , Karthikeyan Mitran , linux-pci@vger.kernel.org, Linus Walleij , linux-kernel@vger.kernel.org, Mans Rullgard , linux-mediatek@lists.infradead.org, Thomas Petazzoni , Matthias Brugger , Hou Zhiqiang , linux-arm-kernel@lists.infradead.org, Andrew Murray Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/03/2020 20:19, Aman Sharma wrote: > diff --git a/drivers/pci/controller/pcie-tango.c b/drivers/pci/controller/pcie-tango.c > index 21a208da3f59..18c2c4313eb5 100644 > --- a/drivers/pci/controller/pcie-tango.c > +++ b/drivers/pci/controller/pcie-tango.c > @@ -273,9 +273,9 @@ static int tango_pcie_probe(struct platform_device *pdev) > writel_relaxed(0, pcie->base + SMP8759_ENABLE + offset); > > virq = platform_get_irq(pdev, 1); > - if (virq <= 0) { > + if (virq < 0) { > dev_err(dev, "Failed to map IRQ\n"); > - return -ENXIO; > + return virq; > } > > irq_dom = irq_domain_create_linear(fwnode, MSI_MAX, &dom_ops, pcie); Weee, here we go again :-) https://patchwork.kernel.org/patch/11066455/ https://patchwork.kernel.org/patch/10006651/ Last time around, my understanding was that, going forward, the best solution was: virq = platform_get_irq(...) if (virq <= 0) return virq ? : -ENODEV; i.e. map 0 to -ENODEV, pass other errors as-is, remove the dev_err @Bjorn/Lorenzo did you have a change of heart? Regards. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel