Author: Himangi Saraogi <himangi774@gmail.com> This patch introduces the use of the macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR. The following Coccinelle semantic patch was used for making the change: @@ expression e; @@ – e == NULL || IS_ERR(e) + IS_ERR_OR_NULL(e) || … Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: David S. …
Category: Linux
Jul 25 2014
net_sched: remove exceptional & on function name
Author: Himangi Saraogi <himangi774@gmail.com> In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall …
Jul 25 2014
neigh: remove exceptional & on function name
Author: Himangi Saraogi <himangi774@gmail.com> In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall …
Jul 25 2014
igmp: remove exceptional & on function name
Author: Himangi Saraogi <himangi774@gmail.com> In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall …
Jul 25 2014
netfilter: nf_conntrack: remove exceptional & on function name
Author: Himangi Saraogi <himangi774@gmail.com> In this file, function names are otherwise used as pointers without &. A simplified version of the Coccinelle semantic patch that makes this change is as follows: // @r@ identifier f; @@ f(…) { … } @@ identifier r.f; @@ – &f + f // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall …
Jul 24 2014
rbd: use rbd_segment_name_free() instead of kfree()
Author: Himangi Saraogi <himangi774@gmail.com> Free memory allocated using kmem_cache_zalloc using kmem_cache_free rather than kfree. The helper rbd_segment_name_free does the job here. Its position is shifted above the calling function. The Coccinelle semantic patch that detects this change is as follows: // @@ expression x,E,c; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,…) … when != x = E when …
Jul 24 2014
isdn: use constants instead of magicnumbers
Author: Himangi Saraogi <himangi774@gmail.com> This patch changes instances of magic numbers like 4 and 8 to equivalent constants. The Coccinelle semantic patch used for making the change is as follows: // @r@ type T; T E; identifier fld; identifier c; @@ E->fld & c @s@ constant C; identifier r.c; @@ #define c C @@ r.T …
Jul 23 2014
nfsd4: convert comma to semicolon
Author: Himangi Saraogi <himangi774@gmail.com> Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: // @r@ expression e1,e2; @@ e1 -, +; e2; …
Jul 23 2014
ceph: replace comma with a semicolon
Author: Himangi Saraogi <himangi774@gmail.com> Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended. A simplified version of the Coccinelle semantic patch that performs this transformation is as follows: // @r@ expression e1,e2; @@ e1 -, +; e2; …
Jul 22 2014
powerpc/perf/hv-24×7: Use kmem_cache_free
Author: Himangi Saraogi <himangi774@gmail.com> Free memory allocated using kmem_cache_zalloc using kmem_cache_free rather than kfree. The Coccinelle semantic patch that makes this change is as follows: // @@ expression x,E,c; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,…) … when != x = E when != &x ?-kfree(x) +kmem_cache_free(c,x) // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: Benjamin Herrenschmidt — …