lkml.org 
[lkml]   [2020]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Coccinelle: zalloc_simple: Fix patch mode for dma_alloc_coherent()
Date
Commit dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()"), in
removing dma_zalloc_coherent() treewide, inadvertently removed the patch
rule for dma_alloc_coherent(), leaving Coccinelle unable to auto-generate
patches for this case. Fix this.

Fixes: dfd32cad146e ("dma-mapping: remove dma_zalloc_coherent()")
CC: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk>
---
scripts/coccinelle/api/alloc/zalloc-simple.cocci | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/scripts/coccinelle/api/alloc/zalloc-simple.cocci b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
index 26cda3f48f01..c53aab7fe096 100644
--- a/scripts/coccinelle/api/alloc/zalloc-simple.cocci
+++ b/scripts/coccinelle/api/alloc/zalloc-simple.cocci
@@ -70,6 +70,15 @@ statement S;
- x = (T)vmalloc(E1);
+ x = (T)vzalloc(E1);
|
+- x = dma_alloc_coherent(E2,E1,E3,E4);
++ x = dma_alloc_coherent(E2,E1,E3,E4);
+|
+- x = (T *)dma_alloc_coherent(E2,E1,E3,E4);
++ x = dma_alloc_coherent(E2,E1,E3,E4);
+|
+- x = (T)dma_alloc_coherent(E2,E1,E3,E4);
++ x = (T)dma_alloc_coherent(E2,E1,E3,E4);
+|
- x = kmalloc_node(E1,E2,E3);
+ x = kzalloc_node(E1,E2,E3);
|
--
2.26.0
\
 
 \ /
  Last update: 2020-04-03 19:31    [W:0.062 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site