]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
locking/atomic/x86: Use 's64 *' for 'old' argument of atomic64_try_cmpxchg()
authorDmitry Vyukov <dvyukov@google.com>
Sat, 17 Jun 2017 09:15:28 +0000 (11:15 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 28 Jun 2017 16:55:55 +0000 (18:55 +0200)
commit007d185b44620f6ffa58f52476bed6e6d7d69d3b
treeddf48ce75db2739ce569d8404418efd904eb5f53
parentba1c9f83f6330a34cc77ef989e183f54c4fe732e
locking/atomic/x86: Use 's64 *' for 'old' argument of atomic64_try_cmpxchg()

atomic64_try_cmpxchg() declares old argument as 'long *',
this makes it impossible to use it in portable code.
If caller passes 'long *', it becomes 32-bits on 32-bit arches.
If caller passes 's64 *', it does not compile on x86_64.

Change type of old argument to 's64 *' instead.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: kasan-dev@googlegroups.com
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/fa6f77f2375150d26ea796a77e8b59195fd2ab13.1497690003.git.dvyukov@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/atomic64_64.h
arch/x86/include/asm/cmpxchg.h