From: "H.J. Lu" <hjl.tools@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: sergio.collado@gmail.com, mario.limonciello@amd.com
Subject: [PATCH] Remove "#define unlikely(cond) (cond)"
Date: Tue, 1 Apr 2025 14:14:24 -0700 [thread overview]
Message-ID: <20250401211424.3244463-1-hjl.tools@gmail.com> (raw)
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>
--
2.49.0
next reply other threads:[~2025-04-01 21:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 21:14 H.J. Lu [this message]
2025-04-01 21:23 ` Mario Limonciello
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=20250401211424.3244463-1-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--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®