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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Shubhrajyoti Datta,

On Thu, Sep 27, 2012 at 2:43 PM, Shubhrajyoti Datta
<omaplinuxkernel@xxxxxxxxx> wrote:
> On Thu, Sep 27, 2012 at 5:46 PM, Peter Senna Tschudin
> <peter.senna@xxxxxxxxx> 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@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
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux