Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3326248pxu; Tue, 15 Dec 2020 04:29:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXx8rvJkvsbSpJWzwodWEJLyRHfxzQNK4qgZv6YjeAEbeeoJ+HbIjd8NvV1CKrG488ArG9 X-Received: by 2002:aa7:d604:: with SMTP id c4mr24018522edr.290.1608035364463; Tue, 15 Dec 2020 04:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608035364; cv=none; d=google.com; s=arc-20160816; b=auqDq3Fzm+xOdRcrZBYgoeISh71dfMJqwnZcOcwwl/C5T0KsljDc5f7VgTjo40I0yJ lQ0FRtUf9BNYbEUVhtyfxPfCT1NGmDptIXhrPgQrjblunEz+Qkw+6taPuqL9DnGirw37 bEDjmaCKo2iP6YDQlLvZiMiVbrIoPN22X99UP+GjoOScfllfx+TxI3KTK/FDvEpM8C2C oyvU9/vn/huqDuLsG/4hwROZRsStBIQlORx+M4zK4aj5ybGvg4c2RmkCx6gXjygat0wx l5DFIOBwORWxDh64fLw8OOrwEywLxrRrul7Khi6yB5dwuY5Nh5MMTA8EtJ/7zDxQaDvW sc6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=Lbs/pZx5+qBrDLnzX3CWHVYvMexqit5xS8jqaq5OH9U=; b=hik4MfRu+3ASj5k/8k0XWbMqYrKEsQ59oEKp/ZHoUSeksRXxzvJdQ2CX++RAdiiMrq ObN1VZKQof42RYNvfCoEgWNqHCJl8F8jsvtbvC9EbqRkldjn9qg9/Fk/uIBbssMqbNBI RSVqT7wF1+NAaoJX61cTf9IZbLUvSNFssBMCIRCfL9Y4YpLdXB8KrRx67DrT2xMwLO4I bRd2HycBAxQxvpBrC4D+hAgIDB1U+kTZq4+uJfpcph7t03yvtUCTolavAKXro9hYANVW FkkrfN195oLR5WP4Np0AtW9aqWUNlGwtnRNM9KMty8DxiWavE61wRMp7b1rH9BFvPZP7 MQPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=QWHd7RmX; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="aLH/Arrm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn9si701499edb.347.2020.12.15.04.29.00; Tue, 15 Dec 2020 04:29:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=QWHd7RmX; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="aLH/Arrm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729344AbgLOM0x (ORCPT + 99 others); Tue, 15 Dec 2020 07:26:53 -0500 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:41425 "EHLO wnew1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729016AbgLOM0k (ORCPT ); Tue, 15 Dec 2020 07:26:40 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id B0ED2776; Tue, 15 Dec 2020 07:25:31 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 15 Dec 2020 07:25:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=Lbs/pZx5+qBrDLnzX3CWHVYvMex qit5xS8jqaq5OH9U=; b=QWHd7RmXkL+WNk4fHPT9BGI3Ammq9BX97bm4KA/eOqz pJQWWjTay/q7wfGMYq7M8v+XCewaIT40SBv+32FFt7nl2IWmcovRrS3BsIGHrX+f ak1CIOY/JAk2tFzaKfeZ3NOo/YWK1s/FoHEj997YOPkRzAG2FN3r/tK465SjS/Ib Yt/mce+zMFTiPaRMpOkQgvNi2IvCuUhBnZ5W0Da4xHe6u8bEcv1DsF56I2E3McKz /LuMJ0EkZw0pBSd0jtALbpcQvnc/5hyI9SxYFQj9kiHT0w4cnc814q2jJg5hFnFr V90mZWFIPzySx6FXZyD6X4Q6mH8HypWfQXWYkTk2MDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Lbs/pZ x5+qBrDLnzX3CWHVYvMexqit5xS8jqaq5OH9U=; b=aLH/ArrmHm70UogR/g/LKL K665tvYCoVNvMqm/cshALLFff3/eLzcaEcTDLblmmKq+n0vy+jZTCu/G4A7yD+up J+HtgjGLzvahRjRQip8DaSUCGcDGeLJrKGG3c36f7gHpSCZhp/2bsUCbo86+7r9u ENwIYHZgPUGXbC7z5Da54+XEIDBz9be3jZZJNqYqoMYLvtRkBA/90bPXYMMC3HCx hcJsaPzJWl1K0xlc5Dj8LvRnygFCYnd/OcVzDfbpc6/C/Iws5cFidr+ccpGAfnwr dZcm3z1/6A63/J+buiCoM7Qd/5Y49rbm2vSboSxkhGtMr7lz5Skxtk6/ZVSAUZqw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeltddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 7C4AB24005A; Tue, 15 Dec 2020 07:25:30 -0500 (EST) Date: Tue, 15 Dec 2020 13:25:28 +0100 From: Maxime Ripard To: Julia Lawall Cc: Wolfram Sang , michal.lkml@markovi.net, Gilles.Muller@lip6.fr, Mark Brown , nicolas.palix@imag.fr, linux-kernel@vger.kernel.org, Jani Nikula , Julia Lawall , Tomi Valkeinen , Thierry Reding , cocci@systeme.lip6.fr Subject: Re: [Cocci] [PATCH] coccinnelle: Remove ptr_ret script Message-ID: <20201215122528.tvkess3nav3uc4uy@gilmour> References: <20200107073629.325249-1-maxime@cerno.tech> <20200107102954.GB1135@ninjato> <20201215084823.towbaqay5tgdh7dw@gilmour> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5lcstcw72h33y6eo" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5lcstcw72h33y6eo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 15, 2020 at 09:52:36AM +0100, Julia Lawall wrote: >=20 >=20 > On Tue, 15 Dec 2020, Maxime Ripard wrote: >=20 > > Hi, > > > > On Tue, Jan 07, 2020 at 11:29:54AM +0100, Wolfram Sang wrote: > > > On Tue, Jan 07, 2020 at 11:06:56AM +0100, Julia Lawall wrote: > > > > > > > > > > > > On Tue, 7 Jan 2020, Maxime Ripard wrote: > > > > > > > > > The ptr_ret script script addresses a number of situations where = we end up > > > > > testing an error pointer, and if it's an error returning it, or r= eturn 0 > > > > > otherwise to transform it into a PTR_ERR_OR_ZERO call. > > > > > > > > > > So it will convert a block like this: > > > > > > > > > > if (IS_ERR(err)) > > > > > return PTR_ERR(err); > > > > > > > > > > return 0; > > > > > > > > > > into > > > > > > > > > > return PTR_ERR_OR_ZERO(err); > > > > > > > > > > While this is technically correct, it has a number of drawbacks. = First, it > > > > > merges the error and success path, which will make it harder for = a reviewer > > > > > or reader to grasp. > > > > > > > > > > It's also more difficult to extend if we were to add some code be= tween the > > > > > error check and the function return, making the author essentiall= y revert > > > > > that patch before adding new lines, while it would have been a tr= ivial > > > > > addition otherwise for the rewiever. > > > > > > > > > > Therefore, since that script is only about cosmetic in the first = place, > > > > > let's remove it since it's not worth it. > > > > > > > > > > Cc: Jani Nikula > > > > > Cc: Thierry Reding > > > > > Cc: Tomi Valkeinen > > > > > Cc: Mark Brown > > > > > Signed-off-by: Maxime Ripard > > > > > > > > Acked-by: Julia Lawall > > > > > > Convincing patch description, good catch! > > > > > > Reviewed-by: Wolfram Sang > > > > It looks like this patch was never applied, whose tree should it go > > through? >=20 > Sorry. I can take it. I'm not sure that I still have the original > message, though. If you have it handy, that would be helpful. Sure, I just sent a new version with all the tags Thanks! Maxime --5lcstcw72h33y6eo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX9irOAAKCRDj7w1vZxhR xdyZAQDzVBVndsiZlVl3kpwfpz/3+6pNB1QKT7x6IGkV57YMrgD7B53xu+cJtvNE 4AYbaLHVlIe4o746cPMHUAdOZviNxgY= =xT3J -----END PGP SIGNATURE----- --5lcstcw72h33y6eo--