Quentin LAMBERT

Author's posts

rtc: use c99 initializers in structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> Use c99 initializers for structures. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @decl@ identifier i1,fld; type T; field list[n] fs; @@ struct i1 { fs T fld; …}; @bad@ identifier decl.i1,i2; expression e; initializer list[decl.n] is; @@ struct i1 i2 = { …

Continue reading

staging: vt6655: replace memcpy() by ether_addr_copy() using coccinelle and pack variables

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file rxtx.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); After applying the rule, …

Continue reading

staging: vt6655: wmgr.c and wmgr.h: replace memcpy() by ether_addr_copy() using coccinelle and pack variable

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file wmgr.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description …

Continue reading

staging: vt6655: dpc.c: replace memcpy() by ether_addr_copy() using coccinelle

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file dpc.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description …

Continue reading

staging: vt6655: card.c: replace memcpy() by ether_addr_copy() using coccinelle

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file rxtx.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description …

Continue reading

ceph: fix bool assignments

Author: Fabian Frederick <fabf@skynet.be> Fix some coccinelle warnings: fs/ceph/caps.c:2400:6-10: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2401:6-15: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2402:6-17: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2403:6-22: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2404:6-22: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2405:6-19: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2440:4-20: WARNING: Assignment of bool …

Continue reading

staging: comedi: drivers: Use DIV_ROUND_CLOSEST

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. The Coccinelle script used: // @haskernel@ @@ @depends on haskernel@ expression x,__divisor; @@ – (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // Signed-off-by: Tapasweni Pathak Signed-off-by: Greg Kroah-Hartman — drivers/staging/comedi/drivers/s626.c | 2 +- 1 …

Continue reading

staging: octeon-usb: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

staging: lustre: lustre: llite: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

staging: iio: adc: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.