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.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 6B23FC433F4 for ; Tue, 18 Sep 2018 16:30:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2058820685 for ; Tue, 18 Sep 2018 16:30:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2058820685 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730201AbeIRWEQ (ORCPT ); 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