From: "Sergio González Collado" <sergio.collado@gmail.com>
To: stable@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Sergio González Collado" <sergio.collado@gmail.com>
Subject: [PATCH v2 6.1.y 2/2] x86/tools: Drop duplicate unlikely() definition in insn_decoder_test.c
Date: Tue, 24 Jun 2025 18:58:52 +0200 [thread overview]
Message-ID: <20250624165852.7689-3-sergio.collado@gmail.com> (raw)
In-Reply-To: <20250624165852.7689-1-sergio.collado@gmail.com>
From: Nathan Chancellor <nathan@kernel.org>
commit f710202b2a45addea3dcdcd862770ecbaf6597ef upstream.
After commit c104c16073b7 ("Kunit to check the longest symbol length"),
there is a warning when building with clang because there is now a
definition of unlikely from compiler.h in tools/include/linux, which
conflicts with the one in the instruction decoder selftest:
arch/x86/tools/insn_decoder_test.c:15:9: warning: 'unlikely' macro redefined [-Wmacro-redefined]
Remove the second unlikely() definition, as it is no longer necessary,
clearing up the warning.
Fixes: c104c16073b7 ("Kunit to check the longest symbol length")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sergio González Collado <sergio.collado@gmail.com>
Link: https://lore.kernel.org/r/20250318-x86-decoder-test-fix-unlikely-redef-v1-1-74c84a7bf05b@kernel.org
---
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.39.2
next prev parent reply other threads:[~2025-06-24 16:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 16:58 [PATCH v2 6.1.y 0/2] Kunit to check the longest symbol length Sergio González Collado
2025-06-24 16:58 ` [PATCH v2 6.1.y 1/2] " Sergio González Collado
2025-06-25 14:07 ` Sasha Levin
2025-06-24 16:58 ` Sergio González Collado [this message]
2025-06-25 14:07 ` [PATCH v2 6.1.y 2/2] x86/tools: Drop duplicate unlikely() definition in insn_decoder_test.c Sasha Levin
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=20250624165852.7689-3-sergio.collado@gmail.com \
--to=sergio.collado@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=mingo@kernel.org \
--cc=nathan@kernel.org \
--cc=ojeda@kernel.org \
--cc=sashal@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.