From: Nicolas Palix Date: Tue, 24 Aug 2010 15:39:10 +0000 (+0200) Subject: Coccinelle: Move alloc directory into api directory X-Git-Tag: v2.6.37-rc1~50^2~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be8fe9d451936a7a412b02cb88a13ffe46879bcf;p=thirdparty%2Flinux.git Coccinelle: Move alloc directory into api directory alloc contains various semantic patches related to the allocation APIs Signed-off-by: Nicolas Palix Signed-off-by: Julia Lawall Signed-off-by: Michal Marek --- diff --git a/scripts/coccinelle/alloc/drop_kmalloc_cast.cocci b/scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci similarity index 100% rename from scripts/coccinelle/alloc/drop_kmalloc_cast.cocci rename to scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci diff --git a/scripts/coccinelle/alloc/kzalloc-simple.cocci b/scripts/coccinelle/api/alloc/kzalloc-simple.cocci similarity index 87% rename from scripts/coccinelle/alloc/kzalloc-simple.cocci rename to scripts/coccinelle/api/alloc/kzalloc-simple.cocci index 2eae828fc657d..046b9b16f8f94 100644 --- a/scripts/coccinelle/alloc/kzalloc-simple.cocci +++ b/scripts/coccinelle/api/alloc/kzalloc-simple.cocci @@ -1,5 +1,9 @@ /// -/// kzalloc should be used rather than kmalloc followed by memset 0 +/// Use kzalloc rather than kmalloc followed by memset with 0 +/// +/// This considers some simple cases that are common and easy to validate +/// Note in particular that there are no ...s in the rule, so all of the +/// matched code has to be contiguous /// // Confidence: High // Copyright: (C) 2009-2010 Julia Lawall, Nicolas Palix, DIKU. GPLv2.