summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/api/alloc/alloc_cast.cocci
Commit message (Collapse)AuthorAgeFilesLines
* Coccinelle: alloc_cast: Add more memory allocating functions to the listHimanshu Jha2018-01-161-21/+71
| | | | | | | | | | | | | | | Add more memory allocating functions that are frequently used in the kernel code to the existing list and remove the useless casts where it is unnecessary. But preserve those casts having __attribute__ such as __force, __iomem, etc. which are used by Sparse in the static analysis of the code. Also remove two blank lines at EOF. Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Coccinelle: Script to detect cast after memory allocationHimangi Saraogi2014-08-061-0/+72
This script detects cases of use of cast for the value returned by kmalloc, kzalloc, kcalloc, kmem_cache_alloc, kmem_cache_zalloc, kmem_cache_alloc_node, kmalloc_node and kzalloc_node and removes the cast as it is not useful. This Coccinelle script replaces drop_kmalloc_cast.cocci as it removes the casting in more limited cases of kmalloc, kzalloc and kcalloc. Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
OpenPOWER on IntegriCloud