History log of /linux-master/scripts/coccinelle/api/alloc/zalloc-simple.cocci
Revision Date Author Comments
# f01701ce 07-Aug-2022 Julia Lawall <Julia.Lawall@inria.fr>

update Coccinelle URL

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>


# 7a2624e6 20-Aug-2020 Alex Dewar <alex.dewar90@gmail.com>

coccinelle: add patch rule for dma_alloc_coherent

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 <alex.dewar90@gmail.com>
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>


# 7f904d7e 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505

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 <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081207.556988620@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dfd32cad 19-Dec-2018 Luis Chamberlain <mcgrof@kernel.org>

dma-mapping: remove dma_zalloc_coherent()

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 <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>


# 6fbd8569 18-Aug-2018 zhong jiang <zhongjiang@huawei.com>

Coccinelle: remove pci_alloc_consistent semantic to detect in 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 <julia.lawall@lip6.fr>
Acked-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 1936f8f3 13-Jan-2018 Himanshu Jha <himanshujha199640@gmail.com>

Coccinelle: kzalloc-simple: Rename kzalloc-simple to zalloc-simple

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>