Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp332846ybh; Thu, 12 Mar 2020 02:53:53 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtuTHcmT3UpXue6XEakGodVs+wDHyIq0OH/TlyOSw+1/mJy5HR9dxvTLfX/PtUiKYcUKryp X-Received: by 2002:a05:6830:16cc:: with SMTP id l12mr670731otr.234.1584006833315; Thu, 12 Mar 2020 02:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584006833; cv=none; d=google.com; s=arc-20160816; b=osMY0TePT62xmiVacSSbvNtXhmUmHKFq6X1JMQMkSEuCYc1DG4Loqrmadu3ci9L0Fi KizcJ1vcdLha5FvfiIWNHtONyVCGi9VxEuCVmv4zyf1vNamqyEECf7+0hrJ8lsOwIwb1 hs7GTstNzXt7U+5AHnvQ+yCBW2evJGFSouH0VxuB7g27K1CK73AYBOJJRIQSqX9ypsA4 qlWRgvHl82Knd3rEAnmWvUxY2l9MQmF0UB9JbX/ZfC2Aokp3JmCdxQik+qMvoEnpdhDl XtVydV1oY5085ffFN9VX5b3uXo+N/R8dof+WeqYFeGmWehOF3c+GEyVFSBE5GL1xeWiq gj+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=RqpwTfWxKZxqG1Sl/nLek1eX1ynyenz/HKWMUfrNzC0=; b=ox/pGFhUuxYzl7lPW0aWpjNWViqS4pw+pzl6g+Q1JS+y3FOE1cy2WWWYN5g3pkk8oG 1Ryqx7Xj+3wECV2/ZNZIGaPeCK+BhbVd1tfPxcBn5FgkN2e2hqloHDjfv8yebAQB1fdt xRSVs1UXmDENSbMUWU+b+6fLonsux/l/nM34qqJcCK7AqoLmDMobd8GE5PSsGp0cmAjW OXJ5O08KUiO+Y1S91Do7XpSjpigrFoY2CANxZpruM1qLql4D3C05DXjt+VcFnuCr7kjn 7Xrp43xM3f7KqfKQQ6A76O8IpNNqP2eOHL1eNUbfDa74bzadTYk59KQ/b5+Pt4KkbfZ8 Rexw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r19si1785813otq.241.2020.03.12.02.53.39; Thu, 12 Mar 2020 02:53:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726571AbgCLJxJ (ORCPT + 99 others); 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.