Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbcJAUUI (ORCPT ); Sat, 1 Oct 2016 16:20:08 -0400 Received: from smtprelay0212.hostedemail.com ([216.40.44.212]:60501 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751120AbcJAUT7 (ORCPT ); Sat, 1 Oct 2016 16:19:59 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:967:973:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2525:2560:2563:2682:2685:2828:2859:2895:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4886:5007:6742:9010:9025:10004:10400:10848:11232:11658:11914:12295:12740:12760:13069:13071:13311:13357:13439:14094:14180:14181:14659:14721:21060:21080:21324:21451:30029:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: leg73_1c6affc513d1b X-Filterd-Recvd-Size: 1968 Message-ID: <1475353194.1996.3.camel@perches.com> Subject: Re: [PATCH 00/15] improve function-level documentation From: Joe Perches To: Julia Lawall , linux-metag@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Sat, 01 Oct 2016 13:19:54 -0700 In-Reply-To: <1475351192-27079-1-git-send-email-Julia.Lawall@lip6.fr> References: <1475351192-27079-1-git-send-email-Julia.Lawall@lip6.fr> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.21.91-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 855 Lines: 32 On Sat, 2016-10-01 at 21:46 +0200, Julia Lawall wrote: > These patches fix cases where the documentation above a function definition > is not consistent with the function header. Issues are detected using the > semantic patch below (http://coccinelle.lip6.fr/). Basically, the semantic > patch parses a file to find comments, then matches each function header, > and checks that the name and parameter list in the function header are > compatible with the comment that preceeds it most closely. Hi Julia. Would it be possible for a semantic patch to scan for function definitions where the types do not have identifiers and update the definitions to match the declarations? For instance, given: int foo(int); int foo(int bar) { return baz; } Could coccinelle output: diff a/some.h b/some.h [] -int foo(int); +int foo(int bar);