Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp564963ybh; Thu, 12 Mar 2020 07:09:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsd3Xw6uEQfYW0OWM6kPR87Mc34urmDDLTsx6Se8yvgOl9+jBCBCvXBgxjmh9zUioK3dpF3 X-Received: by 2002:a9d:895:: with SMTP id 21mr6260273otf.365.1584022166662; Thu, 12 Mar 2020 07:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584022166; cv=none; d=google.com; s=arc-20160816; b=Hz1gQs+MT5kAho9W9LqW8Gw9X3skIdHQxIVcvv71V/T0Z+rKhKiM2NbwqjljHbvtt1 9XYPaw7C44TaLIrI5IxPccZ+LHsf0atXjWAhw+UC+nfABHJuZhDJe6wnizK9E1evcqpD W5yrMv0pyExn1WNOmkfCTaLZ0Hu24UPNfF5Of2Snun3vhSt3EYxvL/WvkfXHxc7o2FTA P9/x0V3sA0/MUkup3BFrIL0ppofJMOocxwOHAVLAvDk66tZnKmR9bsFKBkUoaDQ483Nz Yr3bVztpP3zJ9ojfNiw9e0aRakonNsCb2wXwrAVxyOjQP6rZyrL+KHKnEdefCIppbdFO BnKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6J9Ig2oz1bb7guvVXYyRNpRVz0RKMu9DYxVEd/SzgXI=; b=h8rmGeYyUR48BIJiGgzZhDOgTCc6/1UZPoOLy+ulwnKmytXTfLHbbwrIg1jYcenKaF Qo2ajLHbkf2oswT27rUrqWLSSpDrPbfnjnJnsIiKc1aCB4LeJ9Ib8K0/jO8pzN1LDVZw WvuMgncgIE1BwsFobObHmQJyF6w/2s6JJtQyZcO+L9w9rVxlnW1l77F2gpJJCqzyY4zW aBxJoMmHVjx03//ctkC2ncI/r8D6ib+758Afj6luvKaY+nhzRTSodNYdYokVwtixnHw9 VLbcE5dAYZGjWUjyZ0O3utyRYzMh7WVtXypA0KblRg9CzzTZVYXv39CJNRe1JxD/cNfO JruQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="H7DN/hrX"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si2939512otj.170.2020.03.12.07.09.12; Thu, 12 Mar 2020 07:09:26 -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; dkim=pass header.i=@linaro.org header.s=google header.b="H7DN/hrX"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727498AbgCLOIM (ORCPT + 99 others); Thu, 12 Mar 2020 10:08:12 -0400 Received: from mail-vk1-f194.google.com ([209.85.221.194]:42972 "EHLO mail-vk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725978AbgCLOIM (ORCPT ); Thu, 12 Mar 2020 10:08:12 -0400 Received: by mail-vk1-f194.google.com with SMTP id e20so1590600vke.9 for ; Thu, 12 Mar 2020 07:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6J9Ig2oz1bb7guvVXYyRNpRVz0RKMu9DYxVEd/SzgXI=; b=H7DN/hrXC5SOfs2915ZbQulRR7iAHtt3uIi89leVhH11cRIYwJ9rIM5rrJTWqrQc9c k6W4+S7mPhWQ2G271UpAF2UqqOBhfUyXVTTOQeRHxJK7VosV9dmfY0UvneGlfP+dqukd ba3Z/Ki7tJ2JemSrkSaxjoOoJtCIg6pMKZ3j9UHyB38C1Ah7aqbxMCC2r+nHacnypqbc r3A4lgiLdqxs92Kk3ltPbguQYkRSI1unHNO6GWPHWvlAERBw4nfA4AMns8o44eOr+zKm BUJ0/BKeCLxznbuOfoSnK76G/tzMHiPgKc78DV+nGGwt69TptpgDvh0rOWdTy6i018Jm ag0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6J9Ig2oz1bb7guvVXYyRNpRVz0RKMu9DYxVEd/SzgXI=; b=HL1r76gL47EXRbceWDXeT5RNhD5hJDMDW8B50s5UFsZlnSfMWnfz/D1CDWkYO6aC3h jMdPw/8rXkX/kmZN1keWBYxGKWDbVi4JLQIj2LuPeyyTB/Lh8Lxw5e7L5fELncMvjqce 3rXUBGXKF5Iwg1YEX5Ag7YqzjVK0+5ytJ/SRjKlw/Jwqr7ieQ1JwrYSjg8mxtT4Juz7W ZrHauvcoyodVQQEIu88HU547fot+5Eme+y/hE09pzAYx4BxHf366BOK5O/m0h98M6iiO l7ksOzdLKW1r3emWLs3dQtKB6P7dcYSUJqpnWVTsaEKOnP9hlHMneAngzs5pdY4Tdt9a 6uyQ== X-Gm-Message-State: ANhLgQ2sITydve6oD98lu5t3RnHq/QqWY7q0xTTXl0oim605xq/X4inC xjXjt3Rhh2JDgYB0TFEkJflc8FcG5CDOEpUMBHuwTw== X-Received: by 2002:a1f:5c84:: with SMTP id q126mr5449459vkb.5.1584022089616; Thu, 12 Mar 2020 07:08:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Walleij Date: Thu, 12 Mar 2020 15:07:58 +0100 Message-ID: Subject: Re: [PATCH 1/5] pci: handled return value of platform_get_irq correctly To: Aman Sharma Cc: Thomas Petazzoni , Lorenzo Pieralisi , Andrew Murray , Bjorn Helgaas , Ryder Lee , Karthikeyan Mitran , Hou Zhiqiang , Marc Gonzalez , Mans Rullgard , Matthias Brugger , linux-pci , Linux ARM , "linux-kernel@vger.kernel.org" , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 8:19 PM Aman Sharma wrote: > Signed-off-by: Aman Sharma > --- > drivers/pci/controller/pci-v3-semi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/pci-v3-semi.c b/drivers/pci/controller/pci-v3-semi.c > index bd05221f5a22..a5bf945d2eda 100644 > --- a/drivers/pci/controller/pci-v3-semi.c > +++ b/drivers/pci/controller/pci-v3-semi.c > @@ -777,9 +777,9 @@ static int v3_pci_probe(struct platform_device *pdev) > > /* Get and request error IRQ resource */ > irq = platform_get_irq(pdev, 0); > - if (irq <= 0) { > + if (irq < 0) { Have you considered: https://lwn.net/Articles/470820/ TL;DR Linus (both of them) are not with you on this. And that is why the code is written like this. Do you really have a platform that could return 0 as IRQ here? In that case, can we fix it? > dev_err(dev, "unable to obtain PCIv3 error IRQ\n"); > - return -ENODEV; > + return irq; That's OK with me. Yours, Linus Walleij