Quentin LAMBERT

Articles de cet auteur

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

powerpc/mpic_msgr: Use kcalloc and correct the argument to sizeof

Author: Himangi Saraogi <himangi774@gmail.com> mpic_msgrs has type struct mpic_msgr **, not struct mpic_msgr *, so the elements of the array should have pointer type, not structure type. The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit …

Lire la suite

powerpc/fsl-pci: Correct use of ! and &

Author: Himangi Saraogi <himangi774@gmail.com> In commit ae91d60ba88ef0bdb1b5e9b2363bd52fc45d2af7, a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The …

Lire la suite

parisc: Eliminate memset after alloc_bootmem_pages

Author: HIMANGI SARAOGI <himangi774@gmail.com> alloc_bootmem and related function always return zeroed region of memory. Thus a memset after calls to these functions is unnecessary. The following Coccinelle semantic patch was used for making the change: @@ expression E,E1; @@ E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(…) … when != E – memset(E,0,E1); Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall Signed-off-by: …

Lire la suite

m68k/mm: Eliminate memset after alloc_bootmem_pages

Author: Himangi Saraogi <himangi774@gmail.com> alloc_bootmem and related functions always return a zeroed region of memory. Thus a memset after calls to these functions is unnecessary. The following Coccinelle semantic patch was used for making the change: @@ expression E,E1; @@ E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(…) … when != E – memset(E,0,E1); Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall …

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.