[PATCH] drivers/staging/iio: Remove unnecessary semicolon

Peter Senna Tschudin peter.senna at gmail.com
Thu Sep 27 13:22:15 UTC 2012


Hello Shubhrajyoti Datta,

On Thu, Sep 27, 2012 at 2:43 PM, Shubhrajyoti Datta
<omaplinuxkernel at gmail.com> wrote:
> On Thu, Sep 27, 2012 at 5:46 PM, Peter Senna Tschudin
> <peter.senna at gmail.com> wrote:
>> Found by http://coccinelle.lip6.fr/
>
> minor nit :
>
> for the benefit of others you may want to mention the script.

Thanks for asking. Here is the semantic patch I've used:

//<smpl>
@r_case@
position p;
@@
switch (...)
{
case ...: ...;@p
}

@r_default@
position p;
@@
switch (...)
{
default: ...;@p
}

@r1@
statement S;
position p1;
position p != {r_case.p, r_default.p};
identifier label;
@@
(
label:;
|
S at p1;@p
)

@script:python r2@
p << r1.p;
p_case << r_case.p;
p1 << r1.p1;
@@
if p[0].line != p1[0].line_end:
        cocci.include_match(False)
@@
position r1.p;
@@
-;@p
//</smpl>




-- 
Peter



More information about the devel mailing list