From: Herbert Xu <herb...@gondor.apana.org.au> Date: Tue, 24 Oct 2017 11:53:20 +0800
> No your patch makes it worse. The original construct makes it > clear that the conditional is real code and not just some debugging > aid. > > With your patch, real code is now inside BUG_ON. This discussion has happened before. But I'll explain the conclusion here for your benefit. BUG_ON() is a statement and everything inside of it will always execute. BUG_ON() is always preferred because it allows arch specific code to pass the conditional result properly into inline asm and builtins for optimal code generation.