summaryrefslogtreecommitdiff
path: root/scripts/coccinelle/api/alloc/kzalloc-simple.cocci
Commit message (Collapse)AuthorAgeFilesLines
* Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simpleHimanshu Jha2018-01-161-448/+0
| | | | | | | | | | | Rename kzalloc-simple to zalloc-simple since now the rule is not specific to kzalloc function only, but also to many other zero memory allocating functions specified in the rule. Suggested-by: SF Markus Elfring <elfring@users.sourceforge.net> 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: kzalloc-simple: Add all zero allocating functionsHimanshu Jha2018-01-161-5/+367
| | | | | | | | | | | | | | | | | There are many instances where memory is allocated using regular allocator functions immediately followed by setting the allocated memory to 0 value using memset. We already have zero memory allocator functions to set the memory to 0 value instead of manually setting it using memset. Therefore, use zero memory allocating functions instead of regular memory allocators followed by memset 0 to remove redundant memset and make the code more cleaner and also reduce the code size. 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: Update the options used to the new option schemeNicolas Palix2013-07-031-1/+1
| | | | | | | | | | | | spatch has changed its option scheme. E.g., --no_show_diff is now --no-show-diff This patch updates: - scripts/coccicheck - Semantic patches under scripts/coccinelle/ Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Coccinelle: Move alloc directory into api directoryNicolas Palix2010-08-311-0/+86
alloc contains various semantic patches related to the allocation APIs Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>