Category: Linux

spi/atmel: fix simple_return.cocci warnings

Author: Fengguang Wu <fengguang.wu@intel.com> drivers/spi/spi-atmel.c:1518:1-4: WARNING: end returns can be simpified and declaration on line 1514 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 Signed-off-by: Mark Brown — drivers/spi/spi-atmel.c | 7 +—— 1 file changed, 1 insertion(+), 6 deletions(-)   diff –git …

Continue reading

ASoC: Intel: mrfld: fix semicolon.cocci warnings

Author: Fengguang Wu <fengguang.wu@intel.com> sound/soc/intel/sst-atom-controls.c:249:2-3: Unneeded semicolon sound/soc/intel/sst-atom-controls.c:289:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu Acked-by: Vinod Koul Signed-off-by: Mark Brown — sound/soc/intel/sst-atom-controls.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/sound/soc/intel/sst-atom-controls.c b/sound/soc/intel/sst-atom-controls.c index dcdeb28..309a8f3 100644 — a/sound/soc/intel/sst-atom-controls.c +++ b/sound/soc/intel/sst-atom-controls.c @@ -454,7 +454,7 @@ static int …

Continue reading

crypto: qat – cleanup coccicheck warning – NULL check before freeing functions

Author: Bruce Allan <bruce.w.allan@intel.com> Analyzing with coccinelle MODE=report… Please check for false positives in the output before submitting a patch. When using “patch” mode, carefully review the patch before submitting it. drivers/crypto/qat/qat_dh895xcc/adf_isr.c:191:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing …

Continue reading

fs/befs/btree.c: remove typedef befs_btree_node

Author: Himangi Saraogi <himangi774@gmail.com> The Linux kernel coding style guidelines suggest not using typedefs for structure types. This patch gets rid of the typedef for befs_btree_node. The following Coccinelle semantic patch detects the case. @tn1@ type td; @@ typedef struct { … } td; @script:python tf@ td

rtc: use c99 initializers in structures

Author: Julia Lawall <Julia.Lawall@lip6.fr> Use c99 initializers for structures. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @decl@ identifier i1,fld; type T; field list[n] fs; @@ struct i1 { fs T fld; …}; @bad@ identifier decl.i1,i2; expression e; initializer list[decl.n] is; @@ struct i1 i2 = { …

Continue reading

staging: vt6655: replace memcpy() by ether_addr_copy() using coccinelle and pack variables

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file rxtx.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); After applying the rule, …

Continue reading

staging: vt6655: wmgr.c and wmgr.h: replace memcpy() by ether_addr_copy() using coccinelle and pack variable

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file wmgr.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description …

Continue reading

staging: vt6655: dpc.c: replace memcpy() by ether_addr_copy() using coccinelle

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file dpc.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description …

Continue reading

staging: vt6655: card.c: replace memcpy() by ether_addr_copy() using coccinelle

Author: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> This patch focuses on fixing the following warning generated by checkpatch.pl for the file rxtx.c : Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2) The changes were applied using the following coccinelle rule: @@ expression e1, e2; @@ – memcpy(e1, e2, ETH_ALEN); + ether_addr_copy(e1, e2); According to ether_addr_copy() description …

Continue reading

ceph: fix bool assignments

Author: Fabian Frederick <fabf@skynet.be> Fix some coccinelle warnings: fs/ceph/caps.c:2400:6-10: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2401:6-15: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2402:6-17: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2403:6-22: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2404:6-22: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2405:6-19: WARNING: Assignment of bool to 0/1 fs/ceph/caps.c:2440:4-20: WARNING: Assignment of bool …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.