Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5323534imm; Tue, 18 Sep 2018 07:48:40 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb58UAfnqgWEM+gFpKGognKD6R16ebnaVXeo+rYev1EzYt1w0U+oAhegsMTC7nGxjKdSZLK X-Received: by 2002:a17:902:6b83:: with SMTP id p3-v6mr30107370plk.133.1537282120286; Tue, 18 Sep 2018 07:48:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537282120; cv=none; d=google.com; s=arc-20160816; b=Tx+yuSGhvxB2qlgac0WXkzH+QKP4zeRoIw94L1U0OTup1esoErp2sP8NWGDZ/s190L ECpHys+PMSU0DI+3FvgSfu7AzZV/n6D8KLgvdIHqzpLXcL+y/AfSBgyf2foyrm1vELHU 01y0HVB9aS391eX42j5pmbuPzUcPJaFNqE/cy3RtRkzYSr6uXUA4YFgu6+uvVeBUieRK loYIBQykhdddYwTygbUIifMGsq3xfeVyVMNxSGQFtrMh2sOaoIQkWMrGI3UnoDFL4KB/ VOIKBpLwLyimSvmWGtkNCqgzjdztWVZiUMnzBOBOeoJq+98jhW99K568TlcHQ+qRFHgC O+CA== 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:dkim-signature; bh=9MSBn6zthiPKedGRFvLQNbBiyueZmH4r8CLVv4/wodA=; b=eaBKXXpvFvZklBE5KUmsoHTuO5rUPPMGx1iBYlEBqUop+al2tcxaPbzyLGYmygBvAe c0k0jHz9xba8YikrlcPfB2dByHPxogt2QkqMD/HabSg0SQheBH9Uvos+b4CuQbiKwgNU sWHSS4yWve7+p5jqOT+qoB4W7POAjJPP8F6ujdj8s5MtfjopoD9GfFnicD5hblPgERP+ arZlzAkL+yvRlc2+RP43rcfGN1HJSzJst3hUY3JV4zeBUg13DFaPNyhiX/6313IOD5/v mC4ul84Icd2qihSHYYDXDN4Lcjh0eO3zVc1GePgTCbAIAa2h+E3qebEmeOPdmx5i3diT R1xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mrkhjAkN; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5-v6si17394046plv.304.2018.09.18.07.48.24; Tue, 18 Sep 2018 07:48:40 -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=@gmail.com header.s=20161025 header.b=mrkhjAkN; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729972AbeIRUUh (ORCPT + 99 others); Tue, 18 Sep 2018 16:20:37 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:54521 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726737AbeIRUUh (ORCPT ); Tue, 18 Sep 2018 16:20:37 -0400 Received: by mail-wm1-f65.google.com with SMTP id c14-v6so2824608wmb.4; Tue, 18 Sep 2018 07:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9MSBn6zthiPKedGRFvLQNbBiyueZmH4r8CLVv4/wodA=; b=mrkhjAkN0+MHkhmvSjCsUKOGYRVOP7dVymflD8NCVhtlPotakbDNGRYTulrxUXD92O fGpCkDIExi15PFVxDcfzNDXDaNj5V4mDizqdCRdEk0/LfbAR1qclAMOlNuXRQt8kgl/d c1y6NlLpuIv09yp49RZ0Sf/WrXNkC78W5QEIon4Cmsrxq63sbYQ6/Htv9Qtz/cau4pZs 58ufmW2f0GIy+AOJH4m6yX7SxG7MNt9nVTk3CQOqegw26i9fpwf9yHcFswoPf0Facu2C 5Rh3s3HorLAfXmC5E6Sts8LlFp2JUoxA9fxCidQx3qlEPJx6zGerfCHBDmM/UuIOezJ7 lhNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9MSBn6zthiPKedGRFvLQNbBiyueZmH4r8CLVv4/wodA=; b=Oqj4w1+ndNn/PwLKP/A65hm0kSODt31aT3pZf4RHUk+xW2UDq5d4kwe8jhTQ645uel tkIMC/6jTzemjMfq56FrxL1GdorYXEbMzkokFdCJZt6mYFOM4tY/8nVr+s2/PHOeNaLB DzZo+WKfc46pc7SaCaHrYQt2uxPcHKt9wNjuWbJDbSJMSgTkY5FnpndfEPzxYEqnAx91 fNrbrAXQIhMu3Wxc1GL102/QW7HaobebL7dxALjyyNQ7ILDuFNzXNGZR4LDrnjHglNy4 jzHgZhwWQnNvbE6i59eUfhGm9xtiqn+OleRS4v7UvoIZ594F0dKkrrfpF2Lk0nO6La3n 9fqQ== X-Gm-Message-State: APzg51A440pSf4JPwg6enU9k8yDYrxDoqts92xHosxRqFMIl/esHxMqT T1/A2VNyw5Q3UGqpZRDYfII= X-Received: by 2002:a1c:a187:: with SMTP id k129-v6mr10366492wme.111.1537282059392; Tue, 18 Sep 2018 07:47:39 -0700 (PDT) Received: from localhost (pD9E515A3.dip0.t-ipconnect.de. [217.229.21.163]) by smtp.gmail.com with ESMTPSA id w3-v6sm19915450wrn.16.2018.09.18.07.47.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 07:47:38 -0700 (PDT) Date: Tue, 18 Sep 2018 16:47:37 +0200 From: Thierry Reding To: Lorenzo Pieralisi 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: <20180918144737.GA30386@ulmo> References: <201807120738.oIXXb65q%fengguang.wu@intel.com> <20180711233041.GA39597@lkp-sbx04> <20180918141838.GA32243@e107981-ln.cambridge.arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: <20180918141838.GA32243@e107981-ln.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > drivers/pci/controller/pci-tegra.c:1132:1-3: WARNING: PTR_ERR_OR_ZERO c= an be used > >=20 > >=20 > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > >=20 > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > >=20 > > Fixes: 6e0832fa432e ("PCI: Collect all native drivers under drivers/pci= /controller/") > > CC: Shawn Lin > > Signed-off-by: kbuild test robot > > --- > >=20 > > pci-tegra.c | 5 +---- > > 1 file changed, 1 insertion(+), 4 deletions(-) >=20 > Thierry, >=20 > 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... Thierry --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAluhEAYACgkQ3SOs138+ s6HSCA/8D3HAVyXRzXB8VImac6wJpL026qaKKkszs5W6STpjFG609Puz9iptCx4d 7SZXc/48zKgs6KQBW+08IT2QBHY/WWUiZiSu0dq2Q/ldd/uJWd7SN9nb98+EKPOy Ckbx6h2l2ZSfqd+l0ViXvNDIcAlR6z/Lu4GOyzeJq+XWL8HSg2xJ1Ht4bfVfK9+0 RQ0Sxb+M1/ilVcQLd1nfrK/0iPRP132UpASx8NVNlC97l/wrUezUbN942FeMyp7D a9j8v4vVmVobQJH0Wko/Uo5bhg1SdFkx3pwnJj2Toj+LhmZklcplHLs5QcjyGljw WkFKeWDy2P6WGvKgt8fCPXpK8CxpV+WrZ8/vmFr3Df+F0iqlEQu4yQPXPTb88quq 0FyUZK1DAPm/VCJWgY7jz19TzNta8kRINbLTXKnNcDKsh4AA3ldoAcmfd57CiC8w WkJcPyqbjc+Zxu33lxV2gAL1o18cj58OvYJUbW2jds97Yi0reW1cdA1EYEuO8ZQG V2ii1kXvFnpcnAnPIjmUjLG/7FqKF0z5Z5hIPvSsWAr4pLszRsZ2Cj/TaxY/Bnib KtwFs+5m1x2VYjwzqe+0dvWENxke1cRyhu2brm2jhzdRkhrpkxwjBQBEG0sB6367 4pw5tq2uWQv7/03eyFnpfKp0rzRgY+qbOHWz1FYrVPWFkcm0ods= =Lanw -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e--