Commit graph android_kernel_sony_sdm845/scripts/coccinelle/misc
Message SHA1
scripts/coccinelle: sizeof of pointer
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Julia Lawall   authored and   Michal Marek   commited 2012-05-25 14:51:12 +02:00
2cbd08253a
scripts/coccinelle: address test is always true
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Julia Lawall   authored and   Michal Marek   commited 2012-05-25 14:51:11 +02:00
4619c2b830
coccinelle: semantic patch for bool issues
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Julia Lawall   authored and   Michal Marek   commited 2012-02-25 00:07:32 +01:00
8991058171
coccinelle: semantic patch to check for PTR_ERR after reassignment
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Julia Lawall   authored and   Michal Marek   commited 2012-02-25 00:07:11 +01:00
4a05f06752
scripts/coccinelle: improve the coverage of some semantic patches
This patch ensures that all semantic patches in the scripts/coccinelle
directory provide the report option.  Report messages that include line
numbers now have the line number preceded by "line" for easier subsequent
processing.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Julia Lawall   authored and   Michal Marek   commited 2012-01-15 00:05:46 +01:00
29a36d4dec
scripts/coccinelle: update for compatability with Coccinelle 0.2.4
For doubleinit.cocci, Coccinelle 0.2.4 requires a comma after ... in a
field list.  Coccinelle also now behaves gracefully when a definition is
provided for a virtual that doesn't exist, so there is no need for the
semantic patch code to check for this case.

Updated the documentation to reflect the fact that the best results will
now be obtained with Coccinelle version 0.2.4 or later.

Signed-off-by: Julia Lawall <julia@diku.dk>

Julia Lawall   authored and   Michal Marek   commited 2010-12-03 12:27:01 +01:00
a1087ef6ab
Coccinelle: Add misc/ifcol.cocci
Find confusingly indented code in or after an if.  An if branch should
be indented.  The code following an if should not be indented.
Sometimes, code after an if that is indented is actually intended to be
part of the if branch.

This has a high rate of false positives, because Coccinelle's column
calculation does not distinguish between spaces and tabs, so code that
is not visually aligned may be considered to be in the same column.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Nicolas Palix   authored and   Michal Marek   commited 2010-08-31 11:43:13 +02:00
49ab7a3913
Coccinelle: Add misc/doubleinit.cocci
Find duplicate field initializations.  This has a high rate of false
positives due to #ifdefs, which Coccinelle is not aware of in a structure
initialization.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>

Nicolas Palix   authored and   Michal Marek   commited 2010-08-31 11:43:13 +02:00
033456e2c5