From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] PCI: fix ptr_ret.cocci warnings Date: Tue, 18 Sep 2018 16:47:37 +0200 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" Return-path: Content-Disposition: inline In-Reply-To: <20180918141838.GA32243@e107981-ln.cambridge.arm.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-tegra@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--