From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbcHFUC6 (ORCPT ); Sat, 6 Aug 2016 16:02:58 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:58613 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbcHFUC4 (ORCPT ); Sat, 6 Aug 2016 16:02:56 -0400 X-IronPort-AV: E=Sophos;i="5.28,477,1464645600"; d="scan'208";a="229169282" Date: Sat, 6 Aug 2016 08:40:22 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: SF Markus Elfring cc: Amitoj Kaur Chawla , LKML , Coccinelle , Gilles Muller , Michal Marek , Nicolas Palix Subject: Re: [PATCH v3] Coccinelle: Script to replace NULL test with IS_ERR test for devm_ioremap_resource In-Reply-To: <0fc7f1af-b66d-3089-8c15-6cdc570ac159@users.sourceforge.net> Message-ID: References: <20160806051548.GA30731@amitoj-Inspiron-3542> <0fc7f1af-b66d-3089-8c15-6cdc570ac159@users.sourceforge.net> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 6 Aug 2016, SF Markus Elfring wrote: > > +@err depends on context || org || report@ > > +statement S; > > +expression e; > > +position j0; > > How do you think about to omit the number from this variable name? > > > > +@@ > > + > > + e = devm_ioremap_resource(...); > > +* if (!e@j0) S > > Are there any more functions to consider for such a source code search pattern? > How do you think about to use a function name list here? How about getting this into the kernel, and then one can worry about adding more functions later. > > > +// ---------------------------------------------------------------------------- > > I suggest to omit such comment lines from this SmPL script. These are introduced by spgen. Likewise for the numbers on the j variables. The pattern j + number can even be useful, because it shows a position variable that introduced to manage the different kinds of output, rather than something that is intrinsic to the computation being performed. julia > > Regards, > Markus >