Author's posts
Nov 03 2012
fs/btrfs: drop if around WARN_ON
Author: Julia Lawall <Julia.Lawall@lip6.fr> Just use WARN_ON rather than an if containing only WARN_ON(1). A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression e; @@ – if (e) WARN_ON(1); + WARN_ON(e); // Signed-off-by: Julia Lawall Reviewed-by: David Sterba Signed-off-by: Chris Mason — fs/btrfs/backref.c | 3 +– …
Nov 03 2012
RDMA/nes: Use WARN()
Author: Julia Lawall <Julia.Lawall@lip6.fr> Use WARN() rather than printk() followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // Signed-off-by: Julia Lawall [ Remove extra KERN_ERR from WARN() format. – Roland ] Signed-off-by: Roland …
Nov 03 2012
fs/btrfs: use WARN
Author: Julia Lawall <Julia.Lawall@lip6.fr> Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // Signed-off-by: Julia Lawall Reviewed-by: David Sterba Signed-off-by: Chris Mason — fs/btrfs/ctree.c | 19 +++++++———— fs/btrfs/disk-io.c …
Nov 03 2012
RDMA/cxgb3: use WARN
Author: Julia Lawall <Julia.Lawall@lip6.fr> Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // Signed-off-by: Julia Lawall Acked-by: Steve Wise Signed-off-by: Roland Dreier — drivers/infiniband/hw/cxgb3/iwch_cm.c | 6 ++—- 1 …
Nov 03 2012
RDMA/cxgb4: use WARN
Author: Julia Lawall <Julia.Lawall@lip6.fr> Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // Signed-off-by: Julia Lawall Acked-by: Steve Wise Signed-off-by: Roland Dreier — drivers/infiniband/hw/cxgb4/cm.c | 6 ++—- 1 …
Nov 03 2012
drivers/net/ethernet/ibm/emac/mal.c: use WARN
Author: Julia Lawall <Julia.Lawall@lip6.fr> Use WARN rather than printk followed by WARN_ON(1), for conciseness. A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression list es; @@ -printk( +WARN(1, es); -WARN_ON(1); // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller — drivers/net/ethernet/ibm/emac/mal.c | 6 ++—- 1 file changed, …
Oct 30 2012
[media] drivers/media/pci/saa7134/saa7134-dvb.c: Test if videobuf_dvb_get_frontend return NULL
Author: Peter Senna Tschudin <peter.senna@gmail.com> Based on commit: e66131cee501ee720b7b58a4b87073b8fbaaaba6 Not testing videobuf_dvb_get_frontend output may cause OOPS if it return NULL. This patch fixes this issue. The semantic patch that found this issue is(http://coccinelle.lip6.fr/): // @@ identifier i,a,b; statement S, S2; @@ i = videobuf_dvb_get_frontend(…); … when != if (!i) S * if (i->a.b) S2 // …
Oct 29 2012
staging: dgrp: fix potential NULL defereference issue
Author: Yuanhan Liu <yuanhan.liu@linux.intel.com> Fix a coccinelle warning catched by Fengguang’s 0-DAY system: + drivers/staging/dgrp/dgrp_net_ops.c:1061:11-27: ERROR: nd is NULL but dereferenced. Put the “done:” label a bit down would solve this issue. Cc: Fengguang Wu Cc: Julia Lawall Cc: Greg Kroah-Hartman Signed-off-by: Yuanhan Liu Signed-off-by: Greg Kroah-Hartman — drivers/staging/dgrp/dgrp_net_ops.c | 2 +- 1 file changed, …
Oct 28 2012
netfilter: nf_nat: use PTR_RET
Author: Wu Fengguang <fengguang.wu@intel.com> Use PTR_RET rather than if(IS_ERR(…)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci Reported-by: Fengguang Wu Signed-off-by: Fengguang Wu Signed-off-by: Pablo Neira Ayuso — net/ipv4/netfilter/iptable_nat.c | 4 +— net/ipv6/netfilter/ip6table_nat.c | 4 +— 2 files changed, 2 insertions(+), 6 deletions(-) diff –git a/net/ipv4/netfilter/iptable_nat.c b/net/ipv4/netfilter/iptable_nat.c index 9e0ffaf..8d65b74 100644 — a/net/ipv4/netfilter/iptable_nat.c +++ b/net/ipv4/netfilter/iptable_nat.c @@ -274,9 +274,7 …
Oct 28 2012
drivers/net/phy/mdio-bitbang.c: Call mdiobus_unregister before mdiobus_free
Author: Peter Senna Tschudin <peter.senna@gmail.com> Based on commit b27393aecf66199f5ddad37c302d3e0cfadbe6c0 Calling mdiobus_free without calling mdiobus_unregister causes BUG_ON(). This patch fixes the issue. The semantic patch that found this issue(http://coccinelle.lip6.fr/): // @@ expression E; @@ … when != mdiobus_unregister(E); + mdiobus_unregister(E); mdiobus_free(E); // Signed-off-by: Peter Senna Tschudin Signed-off-by: David S. Miller — drivers/net/phy/mdio-bitbang.c | 1 + 1 …