Catégorie : Linux

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 — …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 = …

Lire la suite

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 = …

Lire la suite

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 = …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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(+), …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.