Author's posts
Dec 30 2013
drivers/dma: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret …
Dec 30 2013
net: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Set the return variable to propagate any error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != …
Dec 30 2013
pktcdvd: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret …
Dec 30 2013
IB/mlx4: Fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret …
Dec 30 2013
UBI: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret …
Dec 30 2013
[media] ec168: fix error return code
Author: Julia Lawall <Julia.Lawall@lip6.fr> The rest of the function uses ret to store the return value, even setting ret to i a few lines before this, so return ret instead of i. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) …
Dec 27 2013
netfilter: ipset: Add hash: fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> net/netfilter/ipset/ip_set_hash_netnet.c:115:8-9: WARNING: return of 0/1 in function ‘hash_netnet4_data_list’ with return type bool /c/kernel-tests/src/cocci/net/netfilter/ipset/ip_set_hash_netnet.c:338:8-9: WARNING: return of 0/1 in function ‘hash_netnet6_data_list’ 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: Jozsef Kadlecsik — net/netfilter/ipset/ip_set_hash_netnet.c | 8 ++++—- 1 …
Dec 22 2013
iwlwifi: mvm: fix harmless smatch / coccinelle warnings
Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Don’t check if mvm->fw->cs is NULL since it can’t be. cs is an array member of iwl_fw, it can’t be NULL. Use memset(ptr, 0, sizeof(*ptr)); instead of memset(ptr, 0, sizeof(struct ptr_type)); Signed-off-by: Emmanuel Grumbach — drivers/net/wireless/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/iwlwifi/mvm/rs.c | 4 ++– 2 files changed, 3 insertions(+), 3 deletions(-) …
Dec 20 2013
[media] fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/staging/media/bcm2048/radio-bcm2048.c:2255:3-4: Unneeded semicolon Removes unneeded semicolon. Generated by: coccinelle/misc/semicolon.cocci CC: Hans Verkuil CC: Mauro Carvalho Chehab Signed-off-by: Fengguang Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 9344dae..b2cd3a8 100644 — a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ …
Dec 20 2013
[media] fix coccinelle warnings
Author: Fengguang Wu <fengguang.wu@intel.com> drivers/staging/media/bcm2048/radio-bcm2048.c:2632:1-7: Replace memcpy with struct assignment /c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:744:1-7: Replace memcpy with struct assignment /c/kernel-tests/src/cocci/drivers/staging/media/bcm2048/radio-bcm2048.c:2360:3-9: Replace memcpy with struct assignment Generated by: coccinelle/misc/memcpy-assign.cocci CC: Hans Verkuil CC: Mauro Carvalho Chehab Signed-off-by: Fengguang Wu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab — drivers/staging/media/bcm2048/radio-bcm2048.c | 8 +++—– 1 file changed, 3 insertions(+), 5 deletions(-) …