mirror of https://github.com/torvalds/linux.git
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/) // <smpl> @ 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); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| af_rxrpc.c | ||
| ar-accept.c | ||
| ar-ack.c | ||
| ar-call.c | ||
| ar-connection.c | ||
| ar-connevent.c | ||
| ar-error.c | ||
| ar-input.c | ||
| ar-internal.h | ||
| ar-key.c | ||
| ar-local.c | ||
| ar-output.c | ||
| ar-peer.c | ||
| ar-proc.c | ||
| ar-recvmsg.c | ||
| ar-security.c | ||
| ar-skbuff.c | ||
| ar-transport.c | ||
| rxkad.c | ||