[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251110144004.347-1-qq570070308@gmail.com>
Date: Mon, 10 Nov 2025 22:40:04 +0800
From: Xie Yuanbin <qq570070308@...il.com>
To: akpm@...ux-foundation.org
Cc: jack@...e.cz,
justinstitt@...gle.com,
linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev,
maninder1.s@...sung.com,
masahiroy@...nel.org,
morbo@...gle.com,
nathan@...nel.org,
nick.desaulniers+lkml@...il.com,
qq570070308@...il.com,
will@...nel.org
Subject: Re: [PATCH] Fix redundant judgment in WARN_ONCE with clang
On Sun, 9 Nov 2025 09:03:17 -0800, Andrew Morton wrote:
> It's a shame you messed with the whitespace. And I don't think it was
> necessary anyway. Here's what it would have looked like:
>
> --- a/include/linux/once_lite.h~fix-redundant-judgment-in-warn_once-with-clang
> +++ a/include/linux/once_lite.h
> @@ -16,7 +16,7 @@
> bool __ret_cond = !!(condition); \
> bool __ret_once = false; \
> \
> - if (unlikely(__ret_cond && !__already_done)) { \
> + if (unlikely(__ret_cond) && unlikely(!__already_done)) {\
> __already_done = true; \
> __ret_once = true; \
> } \
Okay, thanks, I will send the v2 patch.
Xie Yuanbin
Powered by blists - more mailing lists