[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <109fc6a3-0a7f-4439-8f66-48987809d333@p183>
Date: Tue, 13 May 2025 21:41:12 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: corbet@....net, workflows@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/9] CodingStyle: recommend static_assert/_Static_assert
On Sat, May 10, 2025 at 08:21:01AM +0200, Greg KH wrote:
> On Fri, May 09, 2025 at 11:34:27PM +0300, Alexey Dobriyan wrote:
> > Linux's BUG_ON is done backwards (condition is inverted).
> > But it is a long story.
> >
> > However C11/C23 allow to partially transition to what all normal
> > programmers are used to, namely assert().
> >
> > Deprecate BUILD_BUG_ON, recommend static_assert/_Static_assert.
> > And then some day BUG_ON will be flipped as well.
>
> Odd, why are you attempting to make all of these mandates without
> actually changing the code itself first?
If I do source code first, some people or checkpatch.pl will say code is
not conformant!
I want to codify rules so my patches don't rejected due to silly
reasons, due to the rules which don't make sense.
> That's just asking for major churn for no good reason...
Reason is there.
static_assert() is better because it is in the standard, and
Linux convention of inverting condition never made any sense.
> Sorry, but this series makes no sense to me.
Powered by blists - more mailing lists