lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250401211424.3244463-1-hjl.tools@gmail.com>
Date: Tue,  1 Apr 2025 14:14:24 -0700
From: "H.J. Lu" <hjl.tools@...il.com>
To: linux-kernel@...r.kernel.org
Cc: sergio.collado@...il.com,
	mario.limonciello@....com
Subject: [PATCH] Remove "#define unlikely(cond) (cond)"

commit c104c16073b7fdb3e4eae18f66f4009f6b073d6f
Author: Sergio González Collado <sergio.collado@...il.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@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ