From: Julia Lawall Date: Sun, 12 Apr 2015 21:34:20 +0000 (+0200) Subject: staging: lustre: drop uses of some OBD alloc and free functions X-Git-Tag: omap-for-v4.3/legacy-v2-signed~121^2~1009 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=840c94d574a8bb5fb03cad0b5aa1bd0e2984b01a;p=pandora-kernel.git staging: lustre: drop uses of some OBD alloc and free functions Replace OBD_ALLOC, OBD_ALLOC_WAIT, OBD_ALLOC_PTR, and OBD_ALLOC_PTR_WAIT by kzalloc or calloc, as appropriate. Replace OBD_FREE and OBD_FREE_PTR by kfree. A simplified version of the semantic patch that makes these changes in the OBD_ALLOC/FREE case is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr,e1,e2; @@ - OBD_ALLOC(ptr,sizeof e1 * e2) + ptr = kcalloc(e2, sizeof e1, GFP_NOFS) @@ expression ptr,size; @@ - OBD_ALLOC(ptr,size) + ptr = kzalloc(size, GFP_NOFS) @@ expression ptr, size; @@ - OBD_FREE(ptr, size); + kfree(ptr); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed