Author: Markus Elfring <elfring@users.sourceforge.net> The release_firmware() 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: Mauro Carvalho Chehab — drivers/staging/media/mn88472/mn88472.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) …
Category: Linux
Feb 01 2015
jfs: Deletion of an unnecessary check before the function call “unload_nls”
Author: Markus Elfring <elfring@users.sourceforge.net> The unload_nls() 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: Dave Kleikamp — fs/jfs/super.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff …
Jan 31 2015
net: sctp: Deletion of an unnecessary check before the function call “kfree”
Author: Markus Elfring <elfring@users.sourceforge.net> The kfree() 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: Neil Horman Signed-off-by: David S. Miller — net/sctp/associola.c | 3 +– 1 file changed, 1 insertion(+), …
Jan 30 2015
[media] media: platform: fix platform_no_drv_owner.cocci warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/media/platform/am437x/am437x-vpfe.c:2767:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Benoit Parrot Signed-off-by: Fengguang Wu Acked-by: Lad, Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/media/platform/am437x/am437x-vpfe.c | 1 – 1 file changed, 1 …
Jan 29 2015
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
Author: David Howells <dhowells@redhat.com> Fix up the following scripted S_ISDIR/S_ISREG/S_ISLNK conversions (or lack thereof) in cachefiles: (1) Cachefiles mostly wants to use d_can_lookup() rather than d_is_dir() as it doesn’t want to deal with automounts in its cache. (2) Coccinelle didn’t find S_IS* expressions in ASSERT() statements in cachefiles. Signed-off-by: David Howells Signed-off-by: Al Viro — …
Jan 29 2015
VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
Author: David Howells <dhowells@redhat.com> Convert the following where appropriate: (1) S_ISLNK(dentry->d_inode) to d_is_symlink(dentry). (2) S_ISREG(dentry->d_inode) to d_is_reg(dentry). (3) S_ISDIR(dentry->d_inode) to d_is_dir(dentry). This is actually more complicated than it appears as some calls should be converted to d_can_lookup() instead. The difference is whether the directory in question is a real dir with a ->lookup op or …
Jan 28 2015
iommu/fsl: Various cleanups
Author: Emil Medve <Emilian.Medve@Freescale.com> Currently a PAMU driver patch is very likely to receive some checkpatch complaints about the code in the context of the patch. This patch is an attempt to fix most of that and make the driver more readable Also fixed a subset of the sparse and coccinelle reported issues. Signed-off-by: Emil …
Jan 28 2015
clk: qcom: fix platform_no_drv_owner.cocci warnings
Author: kbuild test robot <fengguang.wu@intel.com> drivers/clk/qcom/lcc-msm8960.c:577:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu Reviewed-by: Stephen Boyd Signed-off-by: Michael Turquette — drivers/clk/qcom/lcc-msm8960.c | 1 – 1 file changed, 1 deletion(-) diff –git a/drivers/clk/qcom/lcc-msm8960.c b/drivers/clk/qcom/lcc-msm8960.c …
Jan 28 2015
clk: qcom: fix platform_no_drv_owner.cocci warnings
Author: kbuild test robot <fengguang.wu@intel.com> drivers/clk/qcom/lcc-ipq806x.c:465:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Rajendra Nayak Signed-off-by: Fengguang Wu Reviewed-by: Stephen Boyd Signed-off-by: Michael Turquette — drivers/clk/qcom/lcc-ipq806x.c | 1 – 1 file changed, 1 deletion(-) diff …
Jan 27 2015
Staging: rtl8192u: Use put_unaligned_le16 in rtl819x_BAProc.c
Author: Vaishali Thakkar <vthakkar1994@gmail.com> This patch introduces the use of function put_unaligned_le16. This is done using Coccinelle and semantic patch used is as follows: @a@ typedef u16, __le16, uint16_t; {u16,__le16,uint16_t} e16; identifier tmp; expression ptr; expression y,e; type T; type T; @@ – tmp = cpu_to_le16(y); ? tmp = e @@ type T; identifier a.tmp; …