summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle
Commit message (Collapse)AuthorAgeFilesLines
* Add scripts/coccinelle/deref_null.cocciNicolas Palix2010-06-121-0/+293
| | | | | | | | | | | Add a Coccinelle file to identify the dereferences of NULL variables This semantic patch identifies when a variable is known to be NULL after a test, but it is still dereferenced later. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Add scripts/coccinelle/err_cast.cocciNicolas Palix2010-06-121-0/+56
| | | | | | | | | | | | Add a Coccinelle file to use the ERR_CAST function Before the release 2.6.25, one had to use ERR_PTR(PTR_ERR(...)) to convert the pointer type of an error. Since then, the function ERR_CAST has been available for that purpose. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Add scripts/coccinelle/resource_size.cocciNicolas Palix2010-06-121-0/+93
| | | | | | | | | This semantic patch replaces explicit computations of resource size by a call to resource_size. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Add scripts/coccinelle/alloc/kzalloc-simple.cocciNicolas Palix2010-06-121-0/+82
| | | | | | | | | | | This semantic patch replaces a pair of calls to kmalloc and memset by a single call to kzalloc. It only looks for simple cases to avoid false positives. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Add scripts/coccinelle/alloc/drop_kmalloc_cast.cocciNicolas Palix2010-06-121-0/+67
The purpose of this semantic patch is to remove useless casts, as mentioned in the Linux documentation. See Chapter 14 in Documentation/CodingStyle for more information. Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>