Commit 69d517e
checkpatch: warn on usage of VM_BUG_ON() and other BUG variants
checkpatch does not point out that VM_BUG_ON() and friends should be
avoided, however, Linus notes:
VM_BUG_ON() has the exact same semantics as BUG_ON. It is literally
no different, the only difference is "we can make the code smaller
because these are less important". [1]
So let's warn on VM_BUG_ON() and other BUG variants as well. While at it,
make it clearer that the kernel really shouldn't be crashed.
As there are some subsystem BUG macros that actually don't end up crashing
the kernel -- for example, KVM_BUG_ON() -- exclude these manually.
[1] https://lore.kernel.org/r/CAHk-=wg40EAZofO16Eviaj7mfqDhZ2gVEbvfsMf6gYzspRjYvw@mail.gmail.com
Signed-off-by: David Hildenbrand <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Corbet <[email protected]>1 parent 1cfd9d7 commit 69d517e
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4695 | 4695 | | |
4696 | 4696 | | |
4697 | 4697 | | |
4698 | | - | |
4699 | | - | |
| 4698 | + | |
| 4699 | + | |
4700 | 4700 | | |
4701 | 4701 | | |
4702 | 4702 | | |
4703 | | - | |
| 4703 | + | |
4704 | 4704 | | |
4705 | 4705 | | |
4706 | 4706 | | |
| |||
0 commit comments