Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5439148imm; Tue, 18 Sep 2018 09:31:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZBmYDIlFoWyhGLq11ba4HGGAUwoGej9OuB3+I95x2689+Waw0c4s86LU90Ho7ciCQ4sHhg X-Received: by 2002:a17:902:9045:: with SMTP id w5-v6mr30607259plz.10.1537288286249; Tue, 18 Sep 2018 09:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537288286; cv=none; d=google.com; s=arc-20160816; b=HZGPRfvgFBWFahCH0HkaNJn/vw/WY2zwHyp/9PMJwVXuGUFWJsv8J581Cdd5gda5j2 rMya6aYR7NnPwYZYaavRDdmVRABthpkX6ywlN2t7QoHLhSfFwI+FqkvPdWxgZb147+0x brSw3pzqJQ6XoZUlfaJYw77IxRQBs1rq3uUIA0k+rf9T1EzB4qbAojtWw124vY8BMErE gJv3MpZ2m+BiYaOTkNs+VPgec18kkZVCjKnUjsKPfsoHc8ZhKodyYWrtbDSzQ5nJ5smA TcI97NgOeXG4lS//O6e/ZFhrqmp6/5Se4Z7b8gJqhkrynDfPD/oeYPbhxqPH0/Ku/Fub KFug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=B/UF6m+8dT3LoX8n7pcT/H1JV9WL+pyZpz6OuGCerXg=; b=HlH1gOiEj0oKnuLJrYxx9lBRbCB8XN68Pdt6r4lUwVtvgIty6n+XACd+BHwtm3tsDq gix/6Kk0/kbkpqbpHbv8iv1WkzL2cfGS8Vi+QLAqznpCXDs8rcMdDccfIorKsRd3nRp8 WsWSQm5OLCHgrXx/tmUb3vF0YGi7ZF/vplNvUrjEZ+pgwpipz22h/6fxExAuRJ4DRoPB YyecnUBIuiwTDuMUKC9jiTetApul2CoTehTT5xn2VBohpUqPdcqhcOS/S9wukwFjEnzc eNKpCR7Xn55gUHolSM2uiaG3LXRmBNruk5h1oKf+pnS91Jp080HegmkndjO/+Lir2stL ibvA== 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 1-v6si19158342pln.415.2018.09.18.09.31.10; Tue, 18 Sep 2018 09:31: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; 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 S1730164AbeIRWEQ (ORCPT + 99 others); Tue, 18 Sep 2018 18:04:16 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47720 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728982AbeIRWEP (ORCPT ); Tue, 18 Sep 2018 18:04:15 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ECA947A9; Tue, 18 Sep 2018 09:30:54 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.emea.arm.com [10.4.13.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 504B13F5BD; Tue, 18 Sep 2018 09:30:53 -0700 (PDT) Date: Tue, 18 Sep 2018 17:30:50 +0100 From: Lorenzo Pieralisi To: Thierry Reding Cc: kbuild test robot , Shawn Lin , kbuild-all@01.org, linux-kernel@vger.kernel.org, Bjorn Helgaas , Jonathan Hunter , linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] PCI: fix ptr_ret.cocci warnings Message-ID: <20180918163050.GC31440@e107981-ln.cambridge.arm.com> References: <201807120738.oIXXb65q%fengguang.wu@intel.com> <20180711233041.GA39597@lkp-sbx04> <20180918141838.GA32243@e107981-ln.cambridge.arm.com> <20180918144737.GA30386@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918144737.GA30386@ulmo> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 18, 2018 at 04:47:37PM +0200, Thierry Reding wrote: > On Tue, Sep 18, 2018 at 03:18:38PM +0100, Lorenzo Pieralisi wrote: > > On Thu, Jul 12, 2018 at 07:30:41AM +0800, kbuild test robot wrote: > > > From: kbuild test robot > > > > > > drivers/pci/controller/pci-tegra.c:1132:1-3: WARNING: PTR_ERR_OR_ZERO can be used > > > > > > > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > > > > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > > > > > > Fixes: 6e0832fa432e ("PCI: Collect all native drivers under drivers/pci/controller/") > > > CC: Shawn Lin > > > Signed-off-by: kbuild test robot > > > --- > > > > > > pci-tegra.c | 5 +---- > > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > Thierry, > > > > are you OK with this change ? I will remove the Fixes: tag since > > this does not fix anything AFAICS. > > This has been proposed several times in the past and each time Bjorn and > I have agreed that we'd rather not merge that change. I think the > original is clearer and allows the code to be more easily extended. > > I don't know if there's a way to "whitelist" certain drivers or sub- > systems where these kinds of changes are known not to be desired. Or > perhaps there's some way to trick coccinelle into not recognizing this > particular instance. > > Then again, it seems wrong to have to work around over-ambitious > semantic patches... I agree with you and Bjorn, I will drop the patches but you have a point. Certainly these patches aren't fixing anything unless I am missing something obvious. Lorenzo