Quentin LAMBERT

Author's posts

fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc’d data using kmem_cache_free

Author: Julia Lawall <julia@diku.dk> Memory allocated using kmem_cache_zalloc should be freed using kmem_cache_free, not kfree. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,e,e1,e2; @@ x = kmem_cache_zalloc(e1,e2) … when != x = e ?-kfree(x) +kmem_cache_free(e1,x) // Signed-off-by: Julia Lawall Signed-off-by: Joel Becker — fs/ocfs2/dlm/dlmlock.c | 2 +- 1 …

Continue reading

drivers/video/msm/mdp.c: adjust error handling code

Author: Julia Lawall <julia@diku.dk> Use the error handling code at the end of the function, rather than returning directly. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier x; @@ kfree(x) @@ identifier r.x; expression E1!=0,E2,E3,E4; statement S; @@ ( if () S | if (…) { … when != …

Continue reading

arch/arm/mach-omap2/clock.c: add missing clk_put

Author: Julia Lawall <julia@diku.dk> Add missing call to clk_put. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression e1,e2; statement S; @@ e1 = clk_get@p1(…); … when != e1 = e2 when != clk_put(e1) when any if (…) { … when != clk_put(e1) when != …

Continue reading

drivers/net: Remove casts of void *

Author: Joe Perches <joe@perches.com> Unnecessary casts of void * clutter the code. These are the remainder casts after several specific patches to remove netdev_priv and dev_priv. Done via coccinelle script (and a little editing): $ cat cast_void_pointer.cocci @@ type T; T *pt; void *pv; @@ – pt = (T *)pv; + pt = pv; Signed-off-by: …

Continue reading

m68k/math-emu: Remove unnecessary code

Author: Greg Dietsche <Gregory.Dietsche@cuw.edu> Remove unnecessary code that matches this coccinelle pattern if (…) return ret; return ret; Signed-off-by: Greg Dietsche Signed-off-by: Geert Uytterhoeven — arch/m68k/math-emu/fp_log.c | 3 — 1 file changed, 3 deletions(-)   diff –git a/arch/m68k/math-emu/fp_log.c b/arch/m68k/math-emu/fp_log.c index 367ecee..3384a52 100644 — a/arch/m68k/math-emu/fp_log.c +++ b/arch/m68k/math-emu/fp_log.c @@ -105,9 +105,6 @@ fp_fetoxm1(struct fp_ext *dest, struct fp_ext …

Continue reading

ata: remove unnecessary code

Author: Greg Dietsche <Gregory.Dietsche@cuw.edu> Compile tested. remove unnecessary code that matches this coccinelle pattern if (…) return ret; return ret; Signed-off-by: Greg Dietsche Signed-off-by: Jeff Garzik — drivers/ata/pata_acpi.c | 8 +——- 1 file changed, 1 insertion(+), 7 deletions(-)   diff –git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c index 91949d9..54145ed 100644 — a/drivers/ata/pata_acpi.c +++ b/drivers/ata/pata_acpi.c @@ -195,8 +195,6 @@ static …

Continue reading

[media] dvb: remove unnecessary code

Author: Greg Dietsche <gregory.dietsche@cuw.edu> remove unnecessary code that matches this coccinelle pattern if (…) return ret; return ret; Signed-off-by: Greg Dietsche Signed-off-by: Mauro Carvalho Chehab — drivers/media/dvb/frontends/cx24116.c | 6 +—– 1 file changed, 1 insertion(+), 5 deletions(-)   diff –git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c index 95c6465..ccd0525 100644 — a/drivers/media/dvb/frontends/cx24116.c +++ b/drivers/media/dvb/frontends/cx24116.c @@ -1452,11 +1452,7 @@ tuned: /* …

Continue reading

e1000: remove unnecessary code

Author: Greg Dietsche <Gregory.Dietsche@cuw.edu> Compile tested. remove unnecessary code that matches this coccinelle pattern if (…) return ret; return ret; Signed-off-by: Greg Dietsche Signed-off-by: David S. Miller — drivers/net/e1000/e1000_hw.c | 7 +—— 1 file changed, 1 insertion(+), 6 deletions(-)   diff –git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c index 7501d97..1698622 100644 — a/drivers/net/e1000/e1000_hw.c +++ b/drivers/net/e1000/e1000_hw.c @@ -3080,7 +3080,6 @@ …

Continue reading

net: icplus: remove unnecessary code

Author: Greg Dietsche <Gregory.Dietsche@cuw.edu> Compile tested. remove unnecessary code that matches this coccinelle pattern if (…) return ret; return ret; Signed-off-by: Greg Dietsche Signed-off-by: David S. Miller — drivers/net/phy/icplus.c | 6 +—– 1 file changed, 1 insertion(+), 5 deletions(-)   diff –git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c index 9a09e24..d4cbc29 100644 — a/drivers/net/phy/icplus.c +++ b/drivers/net/phy/icplus.c @@ -109,11 +109,7 @@ …

Continue reading

staging: remove unnecessary code

Author: Greg Dietsche <Gregory.Dietsche@cuw.edu> Compile tested. remove unnecessary code that matches this coccinelle pattern if (…) return ret; return ret; Signed-off-by: Greg Dietsche Acked-by: Franky Lin Signed-off-by: Greg Kroah-Hartman — drivers/staging/bcm/Misc.c | 10 ++——– drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c | 8 +——- drivers/staging/comedi/comedi_fops.c | 2 +- drivers/staging/comedi/drivers/usbdux.c | 5 +—- drivers/staging/tm6000/tm6000-cards.c | 6 +—– 5 files changed, 6 insertions(+), …

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.