From: Julia Lawall Date: Tue, 4 Mar 2008 23:21:05 +0000 (-0800) Subject: ocfs2: Use BUG_ON X-Git-Tag: v2.6.26-rc1~1143^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1f3550fa1471b691ad6c2f35b5b22e93eaa5855;p=pandora-kernel.git ocfs2: Use BUG_ON if (...) BUG(); should be replaced with BUG_ON(...) when the test has no side-effects to allow a definition of BUG_ON that drops the code completely. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @ disable unlikely @ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (unlikely(E)) { BUG(); } + BUG_ON(E); ) @@ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) // Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Mark Fasheh --- Reading git-diff-tree failed