Category: Coccinelle

dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()

Author: Luis R. Rodriguez <mcgrof@suse.com> Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines …

Continue reading

bus: vexpress-config: Add missing of_node_put

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> for_each_compatible_node performs an of_node_get on each iteration, so to break out of the loop an of_node_put is required. Found using Coccinelle. The semantic patch used for this is as follows: // @@ expression e; local idexpression n; @@ for_each_compatible_node(n, …) { … when != of_node_put(n) when != e = n …

Continue reading

cleancache: constify cleancache_ops structure

Author: Julia Lawall <julia.lawall@lip6.fr> The cleancache_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Konrad Rzeszutek Wilk — drivers/xen/tmem.c | 2 +- include/linux/cleancache.h | 2 +- mm/cleancache.c | 4 ++– 3 files changed, 4 insertions(+), 4 deletions(-)   diff –git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index 945fc43..4ac2ca8 …

Continue reading

iio: core: fix ptr_ret.cocci warnings

Author: Fengguang Wu <fengguang.wu@intel.com> drivers/iio/industrialio-sw-trigger.c:169:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu Cc: Joel Becker Cc: Lars-Peter Clausen Cc: Christoph Hellwig Cc: Hartmut Knaack Cc: Octavian Purdila Cc: Paul Bolle Cc: Adriana Reus Cc: Daniel Baluta Cc: Cristina Opriceana Cc: Peter Meerwald Cc: Alexander …

Continue reading

fat: constify fatent_operations structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> The fatent_operations structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/fat/fat.h | 2 +- fs/fat/fatent.c | 24 ++++++++++++———— 2 files changed, 13 insertions(+), 13 deletions(-)   diff –git a/fs/fat/fat.h b/fs/fat/fat.h index …

Continue reading

i40iw: add file to handle cqp calls

Author: Faisal Latif <faisal.latif@intel.com> i40iw_ctrl.c provides for hardware wqe support and cqp. Changes since v2: cleanup coccinelle error reported by Julia Lawall Changes since v1: reported by Christoph Hellwig’s review -remove unnecessary casts Acked-by: Anjali Singhai Jain Acked-by: Shannon Nelson Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford — drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 4743 ++++++++++++++++++++++++++++++ 1 file changed, 4743 …

Continue reading

ocfs2: constify ocfs2_extent_tree_operations structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> The ocfs2_extent_tree_operations structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/ocfs2/alloc.c | 12 ++++++—— fs/ocfs2/alloc.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)   diff –git …

Continue reading

fsl/fman: Delete one function call “put_device” in dtsec_config()

Author: Markus Elfring <elfring@users.sourceforge.net> The Coccinelle semantic patch script “deref_null.cocci” pointed a problem out in the implementation of the function “dtsec_config”. A null pointer was assigned to the data structure member “tbiphy” of the variable “dtsec” if a matching device was not found. A call of the function “put_device” was unnecessary then because a previous …

Continue reading

drm/rockchip/dsi: fix handling mipi_dsi_pixel_format_to_bpp result

Author: Andrzej Hajda <a.hajda@samsung.com> The function can return negative value so it should be assigned to signed variable. The problem has been detected using patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci. Signed-off-by: Andrzej Hajda Reviewed-by: Chris Zhong — drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)   diff –git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index 7bfe243..f8f8f29 100644 — a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c +++ …

Continue reading

audit: Delete unnecessary checks before two function calls

Author: Markus Elfring <elfring@users.sourceforge.net> The functions consume_skb() and kfree_skb() test whether their argument is NULL and then return immediately. Thus the tests around their calls are not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring [PM: tweak patch prefix] Signed-off-by: Paul Moore — kernel/audit.c | 7 ++—– 1 file changed, …

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.