summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2024-06-05 20:13:16 +0200
committerIngo Molnar <mingo@kernel.org>2024-07-17 16:28:19 +0200
commitdce2a224763ce968445e14c43b49321936309c75 (patch)
tree9eb9ec666d7ce42db8f96698ad115f3b505c0b84 /arch/x86/include
parentlocking/atomic/x86: Introduce the read64_nonatomic macro to x86_32 with cx8 (diff)
downloadlinux-dce2a224763ce968445e14c43b49321936309c75.tar.xz
linux-dce2a224763ce968445e14c43b49321936309c75.zip
locking/atomic/x86: Redeclare x86_32 arch_atomic64_{add,sub}() as void
Correct the return type of x86_32 arch_atomic64_add() and arch_atomic64_sub() functions to 'void' and remove redundant return. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20240605181424.3228-2-ubizjak@gmail.com
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/atomic64_32.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/include/asm/atomic64_32.h b/arch/x86/include/asm/atomic64_32.h
index 8db2ec4d6cda..1f650b4dde50 100644
--- a/arch/x86/include/asm/atomic64_32.h
+++ b/arch/x86/include/asm/atomic64_32.h
@@ -163,20 +163,18 @@ static __always_inline s64 arch_atomic64_dec_return(atomic64_t *v)
}
#define arch_atomic64_dec_return arch_atomic64_dec_return
-static __always_inline s64 arch_atomic64_add(s64 i, atomic64_t *v)
+static __always_inline void arch_atomic64_add(s64 i, atomic64_t *v)
{
__alternative_atomic64(add, add_return,
ASM_OUTPUT2("+A" (i), "+c" (v)),
ASM_NO_INPUT_CLOBBER("memory"));
- return i;
}
-static __always_inline s64 arch_atomic64_sub(s64 i, atomic64_t *v)
+static __always_inline void arch_atomic64_sub(s64 i, atomic64_t *v)
{
__alternative_atomic64(sub, sub_return,
ASM_OUTPUT2("+A" (i), "+c" (v)),
ASM_NO_INPUT_CLOBBER("memory"));
- return i;
}
static __always_inline void arch_atomic64_inc(atomic64_t *v)