Skip to content

Commit

Permalink
x86/tools: Drop duplicate unlikely() definition in insn_decoder_test.c
Browse files Browse the repository at this point in the history
After commit c104c16 ("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: c104c16 ("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>
Link: https://lore.kernel.org/r/20250318-x86-decoder-test-fix-unlikely-redef-v1-1-74c84a7bf05b@kernel.org
  • Loading branch information
Nathan Chancellor authored and Ingo Molnar committed Mar 28, 2025
1 parent b5322b6 commit f710202
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/x86/tools/insn_decoder_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit f710202

Please sign in to comment.