Author: Markus Elfring <elfring@users.sourceforge.net> The input_free_device() 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 Signed-off-by: Dmitry Torokhov — drivers/input/joystick/adi.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Category: Linux
Feb 11 2015
regmap-irq: set IRQF_ONESHOT flag to ensure IRQ request
Author: Valentin Rothberg <Valentin.Rothberg@lip6.fr> Since commit 1c6c69525b40eb76de8adf039409722015927dc3 (“genirq: Reject bogus threaded irq requests”) threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. The %irq_flags flag is used to request the threaded IRQ and is also a parameter of the caller. Hence, we cannot be sure that IRQF_ONESHOT …
Feb 11 2015
netfilter: ipset: fix boolreturn.cocci warnings
Author: Wu Fengguang <fengguang.wu@intel.com> net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function ‘set_match_v3’ with return type bool net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function ‘set_match_v4’ with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: Jozsef Kadlecsik Signed-off-by: Fengguang Wu Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira …
Feb 11 2015
pcmcia: Use setup_timer
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of function setup_timer. This is done using Coccinelle and semantic patch used is as follows: @@ expression x,y,z; @@ – init_timer (&x); + setup_timer (&x, y, z); – x.function = y; – x.data = z; Signed-off-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman — drivers/pcmcia/omap_cf.c | 4 +— …
Feb 11 2015
pcmcia: Use setup_timer and mod_timer
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of functions setup_timer and mod_timer. This is done using Coccinelle and semantic patch used for this as follows: // @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); // Signed-off-by: Vaishali Thakkar …
Feb 11 2015
drivers/net: Use setup_timer and mod_timer
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of functions setup_timer and mod_timer. This is done using Coccinelle and semantic patch used for this as follows: // @@ expression x,y,z,a,b; @@ -init_timer (&x); +setup_timer (&x, y, z); +mod_timer (&a, b); -x.function = y; -x.data = z; -x.expires = b; -add_timer(&a); // Signed-off-by: Vaishali Thakkar …
Feb 11 2015
iio: gp2ap020a00f: Use put_unaligned_le32
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of function put_unaligned_le32. This is done using Coccinelle and semantic patch used is as follows: @@ identifier tmp; expression ptr; expression y,e; type T; @@ – tmp = cpu_to_le32(y); ? tmp = e @@ type T; identifier tmp; @@ – T tmp; …when != tmp Signed-off-by: …
Feb 11 2015
mm/slab_common.c: use kmem_cache_free()
Author: Vaishali Thakkar <vthakkar1994@gmail.com> Here, free memory is allocated using kmem_cache_zalloc. So, use kmem_cache_free instead of kfree. This is done using Coccinelle and semantic patch used is as follows: @@ expression x,E,c; @@ x = \(kmem_cache_alloc\|kmem_cache_zalloc\|kmem_cache_alloc_node\)(c,…) … when != x = E when != &x ?-kfree(x) +kmem_cache_free(c,x) Signed-off-by: Vaishali Thakkar Acked-by: Christoph Lameter Cc: Pekka …
Feb 09 2015
net: Mellanox: Delete unnecessary checks before the function call “vunmap”
Author: Markus Elfring <elfring@users.sourceforge.net> The vunmap() function performs also input parameter validation. 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: Eli Cohen Signed-off-by: David S. Miller — drivers/net/ethernet/mellanox/mlx4/alloc.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/alloc.c | 2 +- 2 files changed, 2 insertions(+), 2 …
Feb 09 2015
PM / OPP / clk: Remove unnecessary OOM message
Author: Quentin Lambert <lambert.quentin@gmail.com> This patch reduces the kernel size by removing error messages that duplicate the normal OOM message. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @@ identifier f,print,l; expression e; constant char[] c; @@ e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(…); if (e == NULL) { } Signed-off-by: Quentin …