Category: Linux

drivers/video/backlight/da9052_bl.c: drop devm_kfree of devm_kzalloc’d data

Author: Julia Lawall <Julia.Lawall@lip6.fr> devm_kfree should not have to be explicitly used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,d; @@ x = devm_kzalloc(…) … ?-devm_kfree(d,x); // Signed-off-by: Julia Lawall Acked-by: Jingoo Han Signed-off-by: Florian Tobias Schandinat Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — drivers/video/backlight/da9052_bl.c | 2 — …

Continue reading

can: peak_pci: fix error return code

Author: Peter Senna Tschudin <peter.senna@gmail.com> Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …

Continue reading

can: peak_pcmcia: fix error return code

Author: Peter Senna Tschudin <peter.senna@gmail.com> Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …

Continue reading

drivers/video/exynos/exynos_mipi_dsi.c: fix error return code

Author: Peter Senna Tschudin <peter.senna@gmail.com> Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …

Continue reading

drivers/video/savage/savagefb_driver.c: fix error return code

Author: Peter Senna Tschudin <peter.senna@gmail.com> Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …

Continue reading

drivers/staging/iio: Remove unnecessary semicolon

Author: Peter Senna Tschudin <peter.senna@gmail.com> A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p

sound: Remove unnecessary semicolon

Author: Peter Senna Tschudin <peter.senna@gmail.com> A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p

[media] drivers/media: Remove unnecessary semicolon

Author: Peter Senna Tschudin <peter.senna@gmail.com> A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p

ext4: use kmem_cache_zalloc instead of kmem_cache_alloc/memset

Author: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: “Theodore Ts’o” — fs/ext4/mballoc.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff –git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index bb821a9..8ec6f88 100644 — a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2232,12 …

Continue reading

drbd: use list_move_tail instead of list_del/list_add_tail

Author: Lars Ellenberg <lars.ellenberg@linbit.com> Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg — drivers/block/drbd/drbd_worker.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index eeda8b8..377f27b 100644 — a/drivers/block/drbd/drbd_worker.c +++ …

Continue reading