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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux