Author: Sasha Levin <sasha.levin@oracle.com> Just use BUG_ON() instead of constructions such as: if (…) BUG() A simplified version of the semantic patch that makes this transformation is as follows: (http://coccinelle.lip6.fr/) // @@ expression e; @@ – if (e) BUG(); + BUG_ON(e); // Signed-off-by: Sasha Levin Signed-off-by: Jiri Kosina — arch/alpha/kernel/pci_iommu.c | 12 ++++——– 1 file …
Category: Linux
Nov 03 2012
drivers/net/wireless/ath/ath6kl/hif.c: 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 Signed-off-by: John W. Linville — drivers/net/wireless/ath/ath6kl/hif.c | 6 ++—- 1 file …
Nov 03 2012
drivers/net/wireless/ath/ath6kl/hif.c: 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 Signed-off-by: Kalle Valo — drivers/net/wireless/ath/ath6kl/hif.c | 6 ++—- 1 file changed, …
Nov 03 2012
ext3: 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 Signed-off-by: Jan Kara — fs/ext3/inode.c | 3 +– 1 file changed, …
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, …