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-prev] [day] [month] [year] [list]
Message-ID: <5e483c9c-2d74-49a3-af63-e3b5ae4e3656@amd.com>
Date: Tue, 1 Apr 2025 16:23:51 -0500
From: Mario Limonciello <mario.limonciello@....com>
To: "H.J. Lu" <hjl.tools@...il.com>, linux-kernel@...r.kernel.org
Cc: sergio.collado@...il.com
Subject: Re: [PATCH] Remove "#define unlikely(cond) (cond)"

On 4/1/2025 4:14 PM, H.J. Lu wrote:
> 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>

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ