Author's posts
Jan 17 2014
[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, …
Jan 13 2014
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 — …
Jan 13 2014
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 …
Jan 13 2014
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 …
Jan 13 2014
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 …
Jan 06 2014
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 …
Jan 03 2014
smsc9420: use named constants for pci_power_t values
Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2; @@ pci_enable_wake(e1, – 0 + PCI_D0 ,e2) // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — drivers/net/ethernet/smsc/smsc9420.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c index 9d6effe..d3b967a 100644 — …
Jan 03 2014
ALSA: cs5535audio: use named constants for pci_power_t values
Author: Julia Lawall <Julia.Lawall@lip6.fr> The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev; @@ pci_set_power_state(pdev, – 3 + PCI_D3hot ) // Signed-off-by: Julia Lawall Signed-off-by: Takashi Iwai — sound/pci/cs5535audio/cs5535audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index 902bebd..c0d2835 100644 — a/sound/pci/cs5535audio/cs5535audio.c …
Jan 03 2014
mfd: sta2x11-mfd: Use named constants for pci_power_t values
Author: Julia Lawall <Julia.Lawall@lip6.fr> If nothing more than to improve code readability. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev; @@ pci_set_power_state(pdev, – 0 + PCI_D0 ) // Signed-off-by: Julia Lawall Signed-off-by: Lee Jones — drivers/mfd/sta2x11-mfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff …
Jan 02 2014
net: tulip: delete useless tests on netdev_priv
Author: Julia Lawall <Julia.Lawall@lip6.fr> Netdev_priv performs an addition, not a pointer dereference, so it seems quite unlikely that its result would ever be NULL. A semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ statement S; @@ – if (!netdev_priv(…)) S // Signed-off-by: Julia Lawall Acked-by: Grant Grundler Signed-off-by: David S. Miller …