Author's posts
Feb 14 2014
staging: fpgaboot: fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/staging/gs_fpgaboot/gs_fpgaboot.c:305:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci CC: Insop Song Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman — drivers/staging/gs_fpgaboot/gs_fpgaboot.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c index fee2f61..31a6741 100644 — a/drivers/staging/gs_fpgaboot/gs_fpgaboot.c +++ b/drivers/staging/gs_fpgaboot/gs_fpgaboot.c @@ -302,10 …
Feb 13 2014
cgroup: fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> kernel/cgroup.c:2256:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(…)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu Signed-off-by: Tejun Heo — kernel/cgroup.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) diff –git a/kernel/cgroup.c b/kernel/cgroup.c index 750d0e1..15dcae7 100644 — a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2171,9 +2171,7 @@ static …
Feb 13 2014
ath10k: release conf_mutex if vdev_start() fails
Author: Kalle Valo <kvalo@qca.qualcomm.com> I modified Michal’s commit c930f744bdb0 (“ath10k: implement channel switching”) to return when vdev_start() fails, but forgot to release conf_mutex. Found by coccinelle: >> drivers/net/wireless/ath/ath10k/mac.c:2745:5-11: preceding lock on line 2663 Signed-off-by: Kalle Valo — drivers/net/wireless/ath/ath10k/mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff –git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 5c5860e..44b550b …
Feb 13 2014
net: remove unnecessary return’s
Author: stephen hemminger <stephen@networkplumber.org> One of my pet coding style peeves is the practice of adding extra return; at the end of function. Kill several instances of this in network code. I suppose some coccinelle wizardy could do this automatically. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller — net/batman-adv/gateway_client.c | 2 — net/ceph/osd_client.c | 2 …
Feb 12 2014
staging/lustre: fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/staging/lustre/lustre/llite/dir.c:1416:2-8: Replace memcpy with struct assignment Generated by: coccinelle/misc/memcpy-assign.cocci CC: Peng Tao CC: Andreas Dilger CC: Oleg Drokin CC: Greg Kroah-Hartman Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/llite/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 78ee3b1..fd0dd20e 100644 — a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c …
Jan 24 2014
fs-ext3-use-rbtree-postorder-iteration-helper-instead-of-opencoding-fix
Author: Andrew Morton <akpm@linux-foundation.org> use do{}while – more efficient and it squishes a coccinelle warning Reported-by: Fengguang Wu Cc: Cody P Schafer Cc: Jan Kara Cc: Michel Lespinasse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/ext3/dir.c | 8 ++++—- 1 file changed, 4 insertions(+), 4 deletions(-) diff –git a/fs/ext3/dir.c b/fs/ext3/dir.c index a331ad1..e66e480 100644 — …
Jan 24 2014
drivers/rtc/rtc-pcf2127.c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
Author: Duan Jiong <duanj.fnst@cn.fujitsu.com> Fix a coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — drivers/rtc/rtc-pcf2127.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-) diff –git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c index 1ee514a..9bd842e 100644 — a/drivers/rtc/rtc-pcf2127.c +++ b/drivers/rtc/rtc-pcf2127.c @@ -197,10 +197,7 @@ static …
Jan 24 2014
mm/rmap: fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> mm/rmap.c:851:9-10: WARNING: return of 0/1 in function ‘invalid_mkclean_vma’ with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: coccinelle/misc/boolreturn.cocci Signed-off-by: Fengguang Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — mm/rmap.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) diff –git …
Jan 17 2014
[media] drx-j: get rid of some ugly macros
Author: Mauro Carvalho Chehab <m.chehab@samsung.com> There are several get/set macros that are bogus: they just call another macro and do either: x = FOO(d) or FOO(d) = x As checkpatch complains about that, and replacing all of them are as easy as running a small coccinelle script, get rid of all of them. Script used: …
Jan 17 2014
x86, intel_mid: Replace memcpy with struct assignment
Author: Fengguang Wu <fengguang.wu@intel.com> This is a cleanup proposed by coccinelle. It replaces memcpy with struct assignment on intel-mid’s sfi layer. Generated by: coccinelle/misc/memcpy-assign.cocci Signed-off-by: Fengguang Wu Link: http://lkml.kernel.org/r/1389917588-9785-1-git-send-email-david.a.cohen@linux.intel.com Signed-off-by: David Cohen Signed-off-by: H. Peter Anvin — arch/x86/platform/intel-mid/sfi.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-) diff –git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index 438306e..994c40b …