Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1335682
| From | Yann Droneaud <ydroneaud@opteya.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] coccinelle: recognize more devm_* memory allocation functions |
| Date | 2016-02-16 19:00 +0100 |
| Message-ID | <r2Rs6-2q8-21@gated-at.bofh.it> (permalink) |
| References | <r2Rs6-2q8-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Updates free/devm_free.cocci to recognize functions added by:
- commit 64c862a839a8 ('devres: add kernel standard devm_k.alloc functions')
- commit e31108cad3de ('devres: introduce API "devm_kstrdup"')
- commit 3046365bb470 ('devres: introduce API "devm_kmemdup')
- commit 43339bed7010 ('devres: Add devm_get_free_pages API')
- commit 75f2a4ead5d5 ('devres: Add devm_kasprintf and devm_kvasprintf API')
See also Documentation/driver-model/devres.txt
Cc: Joe Perches <joe@perches.com>
Cc: Manish Badarkhe <badarkhe.manish@gmail.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Eli Billauer <eli.billauer@gmail.com>
Cc: Himangi Saraogi <himangi774@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
---
scripts/coccinelle/free/devm_free.cocci | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle/free/devm_free.cocci
index 83c03adec1c5..3794cd97494b 100644
--- a/scripts/coccinelle/free/devm_free.cocci
+++ b/scripts/coccinelle/free/devm_free.cocci
@@ -29,8 +29,24 @@ expression x;
@@
(
+ x = devm_kmalloc(...)
+|
+ x = devm_kvasprintf(...)
+|
+ x = devm_kasprintf(...)
+|
x = devm_kzalloc(...)
|
+ x = devm_kmalloc_array(...)
+|
+ x = devm_kcalloc(...)
+|
+ x = devm_kstrdup(...)
+|
+ x = devm_kmemdup(...)
+|
+ x = devm_get_free_pages(...)
+|
x = devm_request_irq(...)
|
x = devm_ioremap(...)
@@ -50,6 +66,10 @@ position p;
|
* kzfree@p(x)
|
+* free_pages@p(x, ...)
+|
+* free_page@p(x)
+|
* free_irq@p(x)
|
* iounmap@p(x)
--
2.5.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 2/3] coccinelle: recognize more devm_* memory allocation functions Yann Droneaud <ydroneaud@opteya.com> - 2016-02-16 19:00 +0100
csiph-web