Category: Linux

Staging: rtl8192e: Replace memset with eth_zero_addr

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. Note that the 6 in the third argument of memset appears to represent an ethernet address size (ETH_ALEN). The Coccinelle semantic patch that makes this change is as follows: …

Continue reading

perf header: Delete an unnecessary check before the calling free_event_desc()

Author: Markus Elfring <elfring@users.sourceforge.net> The free_event_desc() 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 Cc: Julia Lawall Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: http://lkml.kernel.org/r/558C2ABA.3000603@users.sourceforge.net Signed-off-by: Arnaldo Carvalho de Melo — tools/perf/util/header.c …

Continue reading

[media] usb/airspy: removing unneeded goto

Author: Maninder Singh <maninder1.s@samsung.com> This patch removes unneded goto, reported by coccinelle. Signed-off-by: Maninder Singh Reviewed-by: Akhilesh Kumar Signed-off-by: Mauro Carvalho Chehab — drivers/media/usb/airspy/airspy.c | 3 — 1 file changed, 3 deletions(-)   diff –git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c index 4069234..8f2e1c2 100644 — a/drivers/media/usb/airspy/airspy.c +++ b/drivers/media/usb/airspy/airspy.c @@ -937,9 +937,6 @@ static int airspy_set_if_gain(struct airspy *s) ret = …

Continue reading

ocfs2: use swap() in ocfs2_double_lock()

Author: Fabian Frederick <fabf@skynet.be> Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick Cc: Julia Lawall Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/ocfs2/namei.c | 11 ++——— 1 file changed, 2 insertions(+), 9 deletions(-)   diff –git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 08a7a5b..6e6abb9 100644 — …

Continue reading

ocfs2: use swap() in swap_refcount_rec()

Author: Fabian Frederick <fabf@skynet.be> Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick Cc: Julia Lawall Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/ocfs2/refcounttree.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff –git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index d8c6af1..b69dd14 100644 — …

Continue reading

ocfs2: use swap() in dx_leaf_sort_swap()

Author: Fabian Frederick <fabf@skynet.be> Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick Cc: Julia Lawall Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/ocfs2/dir.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-)   diff –git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index a7f01f3..02878a8 100644 — …

Continue reading

IB/srpt: Convert use of __constant_cpu_to_beXX to cpu_to_beXX

Author: Vaishali Thakkar <vthakkar1994@gmail.com> In little endian cases, the macro cpu_to_be{16,32,64} unfolds to __swab{16,32,64} which provides special case for constants. In big endian cases, __constant_cpu_to_be{16,32,64} and cpu_to_be{16,32,64} expand directly to the same expression. So, replace __constant_cpu_to_be{16,32,64} with cpu_to_be{16,32,64} with the goal of getting rid of the definitions of __constant_cpu_to_be{16,32,64} completely. The Coccinelle semantic patch that …

Continue reading

sysfs: fix simple_return.cocci warnings

Author: kbuild test robot <fengguang.wu@intel.com> security/smack/smackfs.c:2251:1-4: WARNING: end returns can be simpified and declaration on line 2250 can be dropped Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Fengguang Wu Acked-by: Serge Hallyn Acked-by: Casey Schaufler — security/smack/smackfs.c | 6 +—– 1 file changed, 1 insertion(+), 5 …

Continue reading

crypto: jitterentropy – Delete unnecessary checks before the function call “kzfree”

Author: Markus Elfring <elfring@users.sourceforge.net> The kzfree() 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: Herbert Xu — crypto/jitterentropy.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff …

Continue reading

pinctrl/exynos: Use irq_set_handler_locked()

Author: Thomas Gleixner <tglx@linutronix.de> Use irq_set_handler_locked() as it avoids a redundant lookup of the irq descriptor. Search and replacement was done with coccinelle. Signed-off-by: Thomas Gleixner Cc: Jiang Liu Cc: Julia Lawall Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org — drivers/pinctrl/samsung/pinctrl-exynos.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index …

Continue reading