]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add warning on BUG/BUG_ON use
authorJoe Perches <joe@perches.com>
Wed, 9 Sep 2015 22:37:27 +0000 (15:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 Sep 2015 20:29:01 +0000 (13:29 -0700)
commite4493c41bb2d7cc7e9151ea43db45336109b5166
tree6d96f106f1d7704fdb800321ab03e1dd111b5ad0
parente512a6761bda0d9c1541bf565ae27dcdf10684a0
checkpatch: add warning on BUG/BUG_ON use

Using BUG/BUG_ON crashes the kernel and is just unfriendly.

Enable code that emits a warning on BUG/BUG_ON use.

Make the code emit the message at WARNING level when scanning a patch and
at CHECK level when scanning files so that script users don't feel an
obligation to fix code that might be above their pay grade.

Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl