Catégorie : Linux

net/ipv4: Use IS_ERR_OR_NULL

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. …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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; …

Lire la suite

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; …

Lire la suite

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 — …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.