aboutsummaryrefslogtreecommitdiff
path: root/scripts/coccinelle/api/alloc/zalloc-simple.cocci
AgeCommit message (Collapse)AuthorFilesLines
2020-08-21coccinelle: add patch rule for dma_alloc_coherentAlex Dewar1-3/+13
Commit dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()") removed the definition of dma_zalloc_coherent() and also removed the corresponding patch rule for replacing instances of dma_alloc_coherent + memset in zalloc-simple.cocci (though left the report rule). Add a new patch rule to remove unnecessary calls to memset after allocating with dma_alloc_coherent. While we're at it, fix a couple of typos. Fixes: dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()") Signed-off-by: Alex Dewar <[email protected]> Signed-off-by: Julia Lawall <[email protected]>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505Thomas Gleixner1-3/+4
Based on 1 normalized pattern(s): gplv2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 58 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Enrico Weigelt <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-01-08dma-mapping: remove dma_zalloc_coherent()Luis Chamberlain1-10/+1
dma_zalloc_coherent() is no longer needed as it has no users because dma_alloc_coherent() already zeroes out memory for us. The Coccinelle grammar rule that used to check for dma_alloc_coherent() + memset() is modified so that it just tells the user that the memset is not needed anymore. Suggested-by: Christoph Hellwig <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2018-08-22Coccinelle: remove pci_alloc_consistent semantic to detect in ↵zhong jiang1-40/+1
zalloc-simple.cocci Because pci_alloc_consistent has been deprecated. We prefer to use dma_alloc_coherent directly. Therefore, we should remove pci_alloc_consistent to increase the confidence. Acked-by: Julia Lawall <[email protected]> Acked-by: Himanshu Jha <[email protected]> Signed-off-by: zhong jiang <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
2018-01-16Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simpleHimanshu Jha1-0/+448
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 <[email protected]> Signed-off-by: Himanshu Jha <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>