Catégorie : Linux

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 …

Lire la suite

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 …

Lire la suite

[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: …

Lire la suite

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 …

Lire la suite

[media] drx-j: replace the ugly CHK_ERROR() macro

Author: Mauro Carvalho Chehab <m.chehab@samsung.com> Using return and goto inside macros is ugly and makes harder to understand the code and the labels. Remove those macros, and add a proper error debug message, when something bad happens. This was generated using the following coccinelle script: @@ @@ -DUMMY_READ(); +do { + u16 dummy; + RR16(demod->my_i2c_dev_addr, …

Lire la suite

brcmsmac: delete useless variable

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete a variable that is at most only assigned to a constant, but never used otherwise. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier i; constant c; @@ -T i; // Signed-off-by: Julia Lawall Signed-off-by: John W. Linville — …

Lire la suite

i810: delete useless variable

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete a variable that is at most only assigned to a constant, but never used otherwise. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier i; constant c; @@ -T i; // Signed-off-by: Julia Lawall Signed-off-by: Tomi Valkeinen — drivers/video/i810/i810_main.c …

Lire la suite

ksz884x: delete useless variable

Author: Julia Lawall <Julia.Lawall@lip6.fr> Delete a variable that is at most only assigned to a constant, but never used otherwise. In this code, it is the variable result that is used for the return code, not rc. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ type …

Lire la suite

staging: tidspbridge: adjust error return code (bugfix)

Author: Julia Lawall <Julia.Lawall@lip6.fr> The variable status is initialized to either 0 or an error code. Return status to propagate the error value. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier i; constant c; @@ -T i; // Signed-off-by: Julia Lawall Signed-off-by: Greg …

Lire la suite

batman-adv: fix coccinelle warnings

Author: Fengguang Wu <fengguang.wu@intel.com> net/batman-adv/network-coding.c:1535:1-7: Replace memcpy with struct assignment Generated by: coccinelle/misc/memcpy-assign.cocci Signed-off-by: Fengguang Wu Signed-off-by: Martin Hundebøll Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli — net/batman-adv/network-coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c index f1b604d..801ece6 100644 — a/net/batman-adv/network-coding.c +++ b/net/batman-adv/network-coding.c @@ -1636,7 +1636,7 @@ batadv_nc_skb_decode_packet(struct batadv_priv …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.