Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp39574ybl; Tue, 7 Jan 2020 01:41:36 -0800 (PST) X-Google-Smtp-Source: APXvYqw+6Ok1Cz4jX3bZIzir4cBo4x3L7UUB2E+bw8YLmZ2qbUpg/MYufMO2DhYriHacytr4DJ/c X-Received: by 2002:a9d:7:: with SMTP id 7mr113992069ota.26.1578390096853; Tue, 07 Jan 2020 01:41:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578390096; cv=none; d=google.com; s=arc-20160816; b=zffgrGt5gow/2B7BfMzEPti+RqRn63/wFRxjm8WXHLxv8XNyyIiPVahmfxW4zqXIgy fDDB5Edz77EG+gM04yDeqxHcyXHSufjk+4oyrJX2ArVwwZI2dDUvM0yI7SMQcsJzecKG 5qOrIw/l9YLymKLTV1usY4pk0QwBDOK39hwkoFhGQQX6DsduWTKoU8r4BpikR/SAiVZV Tp+V3BLkv6R7dvSyVrVsjBLc8FQwj96EgkGcshhsO3Ecb+03OLQD5LBxueJLX4ioxd8l 6+vrqeSmXBFqMzrg6+BVwzYrXD0kxfERJB84aCHCPjCeAAAG8cbhtGOYlIkuGspom+JH YBsw== 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=zxP1CIfvaIesWXzyg7PNCDmPXdQ++BEJZih1OlkgT3U=; b=lUNSOZVrEa7WJGv2WEttuRK3bJr/BZGaqJxR3rpNLDI29aw/rdachh9vWeSXV8abz0 n/23NnBEigUKkpyAjxWGMkZ5+JGVYsE1TjaizG0hESvYzBgrqw0p4i4GTlA15SqdxLTO VAPmUFM2iCiplBWt9kPulfVNUBrdVm9HeguSryWss+1F+Ut6C9HOFEXmyhyx5mC7ZrZU oYLnhTw9U4pOTyT7bRhyKxPkKNEN7PeG9+tHMSeEyXLMRc0qdLod2heSV++lYUlu6m+c n7t7SH72VQm/Y57P91RkMlx+5eulKAj1QuL/R7uKDrsN5k8VqZfHsu+HJz0uCRwoiBAX /R6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZOVlIFa3; 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 h9si15164548oie.74.2020.01.07.01.41.24; Tue, 07 Jan 2020 01:41:36 -0800 (PST) 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=ZOVlIFa3; 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 S1727782AbgAGJkj (ORCPT + 99 others); Tue, 7 Jan 2020 04:40:39 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45758 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbgAGJki (ORCPT ); Tue, 7 Jan 2020 04:40:38 -0500 Received: by mail-wr1-f66.google.com with SMTP id j42so53080593wrj.12 for ; Tue, 07 Jan 2020 01:40:36 -0800 (PST) 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=zxP1CIfvaIesWXzyg7PNCDmPXdQ++BEJZih1OlkgT3U=; b=ZOVlIFa3JnmWxNCkjntBBFNr53FtLCWDaRMwhIpLfRBJs/g+6R8pLh2s8Iu0wab9V9 c0kC92BIeTpXGobrqEeHPLQkcrEaSsjq5hQDh+Qg+Ic1IZ3UuIf+Ir3g1jjRlJn/UmuP lfyvw7rrtxib9c4i03gF7aGAbxGgU0nbtTnAqyI+JFULP8ULd9HUK2ZscUXHJpx+n3Sm 8QHD9v0VD5hO2I+CEld/mg1rwtaCXDl8ZIAcfOzgpnquQlyTUS0JetwBJlScIHiad+AT 8t64QWM1HNZ2TkrArbMukLTtwN1B5m6TigLGfFPxtbhjlj0LiRX+IQLL6xBNGrKYRg7R u0Ug== 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=zxP1CIfvaIesWXzyg7PNCDmPXdQ++BEJZih1OlkgT3U=; b=geSeBLlmP8RUvSYDkfvAWJRmIuL0QCt/STgM7mk/uDfM6EI2H/9ihTDvhRT9sG04Y5 mzdCco/rTIypbyyXf7+RmUGpdtsMukURIuVl0A4rFnuLx7mE/A8MhL3XNaNq/ZsFWb7G 9iep8FNKqoOXsfshUYi6TYH4yM1bANEuZGCpuPefN7dirl81vI2u/Hc+zGQHom9iU1JL sVIHcAQU3fk9fSQ5ztJ5ZBofa8gZ+wx4MpVeDnA9KJURsp0MySKBK9rUg/Xap72rnxZu e7p+8g0Gq96WvExM7g7aqOWqI2pJZhWftumyWPg6DWKi5Zsbp5FyXJ2XTrkFeeOLJrx5 OHxg== X-Gm-Message-State: APjAAAXog0ctDfOddfLtDioPcw7IaXfHge/y1TkCAihNeJhPh1UxWa6/ 24AcuTuA9WGN8SH8kudAtGs= X-Received: by 2002:a5d:480f:: with SMTP id l15mr108461433wrq.305.1578390035937; Tue, 07 Jan 2020 01:40:35 -0800 (PST) Received: from localhost (p2E5BEF3F.dip0.t-ipconnect.de. [46.91.239.63]) by smtp.gmail.com with ESMTPSA id t81sm26701607wmg.6.2020.01.07.01.40.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 01:40:34 -0800 (PST) Date: Tue, 7 Jan 2020 10:40:33 +0100 From: Thierry Reding To: Maxime Ripard Cc: Julia.Lawall@lip6.fr, Gilles.Muller@lip6.fr, nicolas.palix@imag.fr, michal.lkml@markovi.net, cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, Jani Nikula , Tomi Valkeinen , Mark Brown Subject: Re: [PATCH] coccinnelle: Remove ptr_ret script Message-ID: <20200107094033.GA1964183@ulmo> References: <20200107073629.325249-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <20200107073629.325249-1-maxime@cerno.tech> User-Agent: Mutt/1.13.1 (2019-12-14) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 07, 2020 at 08:36:29AM +0100, 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 return 0 > otherwise to transform it into a PTR_ERR_OR_ZERO call. >=20 > So it will convert a block like this: >=20 > if (IS_ERR(err)) > return PTR_ERR(err); >=20 > return 0; >=20 > into >=20 > return PTR_ERR_OR_ZERO(err); >=20 > 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 review= er > or reader to grasp. >=20 > It's also more difficult to extend if we were to add some code between the > error check and the function return, making the author essentially revert > that patch before adding new lines, while it would have been a trivial > addition otherwise for the rewiever. >=20 > Therefore, since that script is only about cosmetic in the first place, > let's remove it since it's not worth it. >=20 > Cc: Jani Nikula > Cc: Thierry Reding > Cc: Tomi Valkeinen > Cc: Mark Brown > Signed-off-by: Maxime Ripard > --- > scripts/coccinelle/api/ptr_ret.cocci | 97 ---------------------------- > 1 file changed, 97 deletions(-) > delete mode 100644 scripts/coccinelle/api/ptr_ret.cocci Acked-by: Thierry Reding --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl4UUg4ACgkQ3SOs138+ s6EekA/9HAPffRsd3afUYPbgxxX1reZMTCSGN2KVhyrHkCUEAOk2H1ZTec12OZ8F yvs+PWDcT7j75QTHUSgEMswx9il6rjN3VcT2OUq3EazQUOLJ/ezPHpFXarmMv/pb 05zEsNtmegA+ZeuP6+Xms5br35z7Q9mwBC1on9LuSwEzYzDiYORxD1JM9C4oOCtn pq/4/CXq0oDaHCq3H+g0/wPjyX68fCwDUiJaJJMyAu56qUCZKsghsVZZVHa6BJGA hvnHixOoK9tBWKXDoqEcp5GZuZaRKQ6N8MrSjZYfsozqPB+oNCMk3+072ggZzXgB TMw5QHOe388eA7afYvAosBU2FrJ1Q6ldWWtMHXlGxFoOSwGv1yhx45ImY8HmUktj uciuPrcYzfXdNMmwRA/AwQQiy1XHn3l+Ys+b3nKfp5xtKSvANwHhdEgAYUufYNS4 LdlKvISonOLFcdPWXBhGzFyqHU9Kwrr839FBW3p6txpPD/wisWh1Hjgk0sa9o8Kg 2O7fVtiF9YnZDOkeFRjJncLsI/U6papicwsk1JTkGmgz6wtevxB47cmxaDLiuadC 9oAVv5yTl9aM4aXEoaNGTP8SlKciSTX8+X2DoBsFJrnr1aumBGXb5bOYZWOpJ/Li 21pSPMQkRBfwTtmR03ytQP+ddM2SuKvCHFrXX7PDjSqL8iPrUMs= =pKJF -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--