From: Julia Lawall Date: Thu, 18 Sep 2014 20:24:02 +0000 (+0200) Subject: staging: lustre: llite: Use kzalloc and rewrite null tests X-Git-Tag: fixes-for-v3.18-merge-window~15^2~383 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=496a51bd64eb15f14cee3519f5b75b28d09567e3;p=pandora-kernel.git staging: lustre: llite: Use kzalloc and rewrite null tests This patch removes some kzalloc-related macros and rewrites the associated null tests to use !x rather than x == NULL. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; statement S,S1; @@ \(OBD_ALLOC\|OBD_ALLOC_WAIT\|OBD_ALLOC_PTR\|OBD_ALLOC_PTR_WAIT\)(ptr,...); if ( + ! ptr - == NULL ) S else S1 @@ expression ptr,size; @@ - OBD_ALLOC(ptr,size) + ptr = kzalloc(size, GFP_NOFS) @@ expression ptr,size; @@ - OBD_ALLOC_WAIT(ptr,size) + ptr = kzalloc(size, GFP_KERNEL) @@ expression ptr,size; @@ - OBD_ALLOC_PTR(ptr) + ptr = kzalloc(sizeof(*ptr), GFP_NOFS) @@ expression ptr,size; @@ - OBD_ALLOC_PTR_WAIT(ptr,size) + ptr = kzalloc(sizeof(*ptr), GFP_KERNEL) // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed