]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/local: Remove trailing semicolon from _ASM_XADD in local_add_return()
authorUros Bizjak <ubizjak@gmail.com>
Sun, 8 Mar 2026 17:12:35 +0000 (18:12 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Sun, 8 Mar 2026 18:56:49 +0000 (19:56 +0100)
Remove the trailing semicolon from the inline assembly statement in
local_add_return().

The _ASM_XADD macro already expands to a complete instruction, making
the extra semicolon unnecessary. More importantly, the stray semicolon
causes GCC to treat the inline asm as containing multiple instructions,
which can skew its internal instruction count estimation and affect
optimization heuristics.

No functional change intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260308171250.7278-1-ubizjak@gmail.com
arch/x86/include/asm/local.h

index 59aa966dc2127c61be2e3bbe443516a54e70c725..4957018fef3ede3efd26cddc106af291798e1cd0 100644 (file)
@@ -106,7 +106,7 @@ static inline bool local_add_negative(long i, local_t *l)
 static inline long local_add_return(long i, local_t *l)
 {
        long __i = i;
-       asm volatile(_ASM_XADD "%0, %1;"
+       asm volatile(_ASM_XADD "%0, %1"
                     : "+r" (i), "+m" (l->a.counter)
                     : : "memory");
        return i + __i;