[PATCH v1 0/3] coding-style.rst: document BUG() and WARN() rules

David Hildenbrand david at redhat.com
Tue Sep 20 22:22:59 AEST 2022


As it seems to be rather unclear if/when to use BUG(), BUG_ON(),
VM_BUG_ON(), WARN_ON_ONCE(), ... let's try to document the result of a
recent discussion.

Details can be found in patch #1.

RFC -> v1:
* "coding-style.rst: document BUG() and WARN() rules ("do not crash the
   kernel")"
 -> Rephrase/extend according to John
 -> Add some details regarding the use of panic()
* powerpc/prom_init: drop PROM_BUG()
 -> Added
* "checkpatch: warn on usage of VM_BUG_ON() and other BUG variants"
 -> Warn on more variants


Cc: Linus Torvalds <torvalds at linux-foundation.org>
Cc: Andrew Morton <akpm at linux-foundation.org>
Cc: Ingo Molnar <mingo at kernel.org>
Cc: David Laight <David.Laight at ACULAB.COM>
Cc: Jonathan Corbet <corbet at lwn.net>
Cc: Andy Whitcroft <apw at canonical.com>
Cc: Joe Perches <joe at perches.com>
Cc: Dwaipayan Ray <dwaipayanray1 at gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn at gmail.com>
Cc: Baoquan He <bhe at redhat.com>
Cc: Vivek Goyal <vgoyal at redhat.com>
Cc: Dave Young <dyoung at redhat.com>
Cc: Jani Nikula <jani.nikula at linux.intel.com>
Cc: Michael Ellerman <mpe at ellerman.id.au>
Cc: Nicholas Piggin <npiggin at gmail.com>
Cc: Christophe Leroy <christophe.leroy at csgroup.eu>

David Hildenbrand (3):
  coding-style.rst: document BUG() and WARN() rules ("do not crash the
    kernel")
  powerpc/prom_init: drop PROM_BUG()
  checkpatch: warn on usage of VM_BUG_ON() and other BUG variants

 Documentation/process/coding-style.rst | 61 ++++++++++++++++++++++++++
 arch/powerpc/kernel/prom_init.c        |  6 ---
 scripts/checkpatch.pl                  |  6 +--
 3 files changed, 64 insertions(+), 9 deletions(-)

-- 
2.37.3



More information about the Linuxppc-dev mailing list