From: Xie Yuanbin <qq570070308@gmail.com>
To: akpm@linux-foundation.org
Cc: jack@suse.cz, justinstitt@google.com,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
maninder1.s@samsung.com, masahiroy@kernel.org, morbo@google.com,
nathan@kernel.org, nick.desaulniers+lkml@gmail.com,
qq570070308@gmail.com, will@kernel.org
Subject: Re: [PATCH] Fix redundant judgment in WARN_ONCE with clang
Date: Mon, 10 Nov 2025 22:40:04 +0800 [thread overview]
Message-ID: <20251110144004.347-1-qq570070308@gmail.com> (raw)
In-Reply-To: <20251109090317.4261cff25a497bcc8a358a7d@linux-foundation.org>
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
prev parent reply other threads:[~2025-11-10 14:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-09 8:37 [PATCH] Fix redundant judgment in WARN_ONCE with clang Xie Yuanbin
2025-11-09 17:03 ` Andrew Morton
2025-11-10 14:40 ` Xie Yuanbin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251110144004.347-1-qq570070308@gmail.com \
--to=qq570070308@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maninder1.s@samsung.com \
--cc=masahiroy@kernel.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox