Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932301AbbEFHQR (ORCPT ); Wed, 6 May 2015 03:16:17 -0400 Received: from mout.web.de ([212.227.15.14]:58948 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755564AbbEFHQO (ORCPT ); Wed, 6 May 2015 03:16:14 -0400 Message-ID: <5549BFAC.2010609@users.sourceforge.net> Date: Wed, 06 May 2015 09:15:56 +0200 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Nicholas Mc Guire CC: Nicholas Mc Guire , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH RFC] Coccinelle: Check for return not matching function signature References: <1430820761-28122-1-git-send-email-hofrat@osadl.org> In-Reply-To: <1430820761-28122-1-git-send-email-hofrat@osadl.org> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Provags-ID: V03:K0:HkjNOm+zh3YsKJVDArkSG2jm3Lipfd+yivylp+OimdHacrVamTg p5zV/2siyLOmoXOLcfrfM55oRrJ4C6VG2jdS5K0iZ1NXLfzKy2IJbNADabAWdoRSG0Um3LE 6xHgx3TKyJhrd3YRAsD44j3xRhLpgqxbN6dLB94W27sWWD9TkTYJpIjOYsmhOlFFBFhZYgs L5YBYmUl9J3lcP+gbwcvg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 729 Lines: 36 > +virtual context > +virtual org > +virtual report Where do you want to reuse these variables in your SmPL scripts? > +@match@ > +identifier f,ret; > +position p; > +type T1,T2; > +@@ > + > +T1 f(...) { > + T2 ret; Will it be more helpful to mark only such variable declarations where the specified data type should be reconsidered by a minus character or an asterisk (instead of the following return statement)? > +<+... > +* return@p ret > +; > +...+> > +} Regards, Markus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/