Category: Coccinelle

net: atm: constify in_cache_ops and eg_cache_ops structures

Author: Julia Lawall <julia.lawall@lip6.fr> The in_cache_ops and eg_cache_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — net/atm/mpc.h | 4 ++– net/atm/mpoa_caches.c | 4 ++– 2 files changed, 4 insertions(+), 4 deletions(-)   diff –git a/net/atm/mpc.h b/net/atm/mpc.h index 0919a88..cfc7b74 100644 — …

Continue reading

adfs: constify adfs_dir_ops structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> The adfs_dir_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Al Viro — fs/adfs/adfs.h | 6 +++— fs/adfs/dir.c | 6 +++— fs/adfs/dir_f.c | 2 +- fs/adfs/dir_fplus.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)   diff –git a/fs/adfs/adfs.h …

Continue reading

mtd: brcmnand: improve memory management

Author: Julia Lawall <julia.lawall@lip6.fr> This patch addresses two related memory management issues in the probe function: 1. for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression …

Continue reading

power/reset: at91-reset: add missing of_node_put

Author: Julia Lawall <Julia.Lawall@lip6.fr> for_each_matching_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression e,e1; local idexpression np; @@ for_each_matching_node(np, e1) { … when != of_node_put(np) when != e = …

Continue reading

iio: adc: spmi-vadc: add missing of_node_put

Author: Julia Lawall <Julia.Lawall@lip6.fr> for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { … when != of_node_put(child) when != e = …

Continue reading

mtd: nand: sunxi: add missing of_node_put

Author: Julia Lawall <julia.lawall@lip6.fr> for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // @@ expression root,e; local idexpression child; @@ for_each_child_of_node(root, child) { … when != of_node_put(child) when != e = …

Continue reading

ste_dma40: Delete an unnecessary check before the function call “kmem_cache_destroy”

Author: Markus Elfring <elfring@users.sourceforge.net> The kmem_cache_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Linus Walleij Signed-off-by: Vinod Koul — drivers/dma/ste_dma40.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Continue reading

USB-EHCI: Delete unnecessary checks before the function call “dma_pool_destroy”

Author: Markus Elfring <elfring@users.sourceforge.net> The dma_pool_destroy() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman — drivers/usb/host/ehci-mem.c | 18 +++++————- 1 file changed, 5 insertions(+), 13 …

Continue reading

s390: Delete unnecessary checks before the function call “debug_unregister”

Author: Markus Elfring <elfring@users.sourceforge.net> The debug_unregister() function performs also input parameter validation. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky — drivers/s390/cio/chsc_sch.c | 3 +– drivers/s390/cio/cio.c | 9 +++—— drivers/s390/cio/qdio_debug.c | 6 ++—- drivers/s390/crypto/zcrypt_api.c | 6 …

Continue reading

rtlwifi: Delete unnecessary checks before the function call “kfree_skb”

Author: Markus Elfring <elfring@users.sourceforge.net> The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Kalle Valo — drivers/net/wireless/realtek/rtlwifi/core.c | 3 +– drivers/net/wireless/realtek/rtlwifi/rtl8723com/fw_common.c | 4 +— 2 files changed, 2 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.