From: Markus Elfring Date: Fri, 10 Jan 2020 10:00:34 +0000 Subject: Re: [PATCH v2] coccinelle: semantic patch to check for inappropriate do_div() calls Message-Id: List-Id: References: <20200107170240.47207-1-wenyang@linux.alibaba.com> In-Reply-To: <20200107170240.47207-1-wenyang@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Wen Yang , cocci@systeme.lip6.fr, kernel-janitors@vger.kernel.org Cc: Michal Marek , Julia Lawall , Greg Kroah-Hartman , Nicolas Palix , Gilles Muller , =?UTF-8?Q?Matthias_M=c3=a4nnich?= , linux-kernel@vger.kernel.org, Thomas Gleixner > +@initialize:python@ … > +def construct_warnings(str, suggested_fun): This function will be used only for the operation modes “org” and “report”. Thus I suggest to replace the specification “initialize” by a corresponding dependency which is already applied for the SmPL rule “r”. Can subsequent SmPL disjunctions become more succinct? The passing of function name variants contains a bit of duplicate Python code. Will a feature request like “Support for SmPL rule groups” become more interesting for the shown use case? https://github.com/coccinelle/coccinelle/issues/164 Regards, Markus