From: Mario Limonciello <mario.limonciello@amd.com>
To: "H.J. Lu" <hjl.tools@gmail.com>, linux-kernel@vger.kernel.org
Cc: sergio.collado@gmail.com
Subject: Re: [PATCH] Remove "#define unlikely(cond) (cond)"
Date: Tue, 1 Apr 2025 16:23:51 -0500 [thread overview]
Message-ID: <5e483c9c-2d74-49a3-af63-e3b5ae4e3656@amd.com> (raw)
In-Reply-To: <20250401211424.3244463-1-hjl.tools@gmail.com>
On 4/1/2025 4:14 PM, H.J. Lu wrote:
> commit c104c16073b7fdb3e4eae18f66f4009f6b073d6f
> Author: Sergio González Collado <sergio.collado@gmail.com>
> Date: Sun Mar 2 23:15:18 2025 +0100
>
> Kunit to check the longest symbol length
>
> included <linux/kallsyms.h> which triggered
>
> arch/x86/tools/insn_decoder_test.c:15:9: warning: "unlikely" redefined
> 15 | #define unlikely(cond) (cond)
> | ^~~~~~~~
> In file included from ./tools/include/linux/build_bug.h:5,
> from ./tools/include/linux/kernel.h:8,
> from ./tools/include/linux/kallsyms.h:5,
> from arch/x86/tools/insn_decoder_test.c:13:
> ./tools/include/linux/compiler.h:128:10: note: this is the location of the previous definition
> 128 | # define unlikely(x) __builtin_expect(!!(x), 0)
>
> Remove "#define unlikely(cond) (cond)" to silence the compiler warning.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
> arch/x86/tools/insn_decoder_test.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/tools/insn_decoder_test.c b/arch/x86/tools/insn_decoder_test.c
> index 6c2986d2ad11..08cd913cbd4e 100644
> --- a/arch/x86/tools/insn_decoder_test.c
> +++ b/arch/x86/tools/insn_decoder_test.c
> @@ -12,8 +12,6 @@
> #include <stdarg.h>
> #include <linux/kallsyms.h>
>
> -#define unlikely(cond) (cond)
> -
> #include <asm/insn.h>
> #include <inat.c>
> #include <insn.c>
Sorry I didn't notice when I suggested to submit, but this same patch
was submitted a week ago.
https://lkml.org/lkml/2025/3/18/1606
prev parent reply other threads:[~2025-04-01 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 21:14 H.J. Lu
2025-04-01 21:23 ` Mario Limonciello [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=5e483c9c-2d74-49a3-af63-e3b5ae4e3656@amd.com \
--to=mario.limonciello@amd.com \
--cc=hjl.tools@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sergio.collado@gmail.com \
/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
all inboxes | Powered by JetHome®