Re: [PATCH v1 3/3] checkpatch: warn on usage of VM_BUG_ON() and other BUG variants

2022-09-23 Thread David Hildenbrand
And I think that "Do not crash" is a stronger statement than "Avoid crashing" so I prefer the original suggestion but it's not a big deal either way. Yes, stronger wording is better. So how about this: "Do not crash the kernel unless it is absolutely unavoidable--use WARN_ON_ONCE() plus

Re: [PATCH v1 3/3] checkpatch: warn on usage of VM_BUG_ON() and other BUG variants

2022-09-22 Thread John Hubbard
On 9/22/22 19:11, Joe Perches wrote: >> Should this be a separate patch? Adding a bunch of exceptions to the BUG() >> rules is >> a separate and distinct thing from adding VM_BUG_ON() and other *BUG*() >> variants to >> the mix. > > Not in my opinion. OK, then. :) > >>>

Re: [PATCH v1 3/3] checkpatch: warn on usage of VM_BUG_ON() and other BUG variants

2022-09-22 Thread Joe Perches
On Thu, 2022-09-22 at 19:05 -0700, John Hubbard wrote: > On 9/20/22 05:23, David Hildenbrand wrote: > > 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 > >

Re: [PATCH v1 3/3] checkpatch: warn on usage of VM_BUG_ON() and other BUG variants

2022-09-22 Thread John Hubbard
On 9/20/22 05:23, David Hildenbrand wrote: > 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 >

[PATCH v1 3/3] checkpatch: warn on usage of VM_BUG_ON() and other BUG variants

2022-09-20 Thread David Hildenbrand
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