Re: [PATCH v3 2/7] x86: use s64* for old arg of atomic64_try_cmpxchg()

From: Andrey Ryabinin
Date: Fri Jun 16 2017 - 11:39:41 EST


On 06/06/2017 01:11 PM, Dmitry Vyukov wrote:
> 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 arg to s64*.
>
> Signed-off-by: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> Cc: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Will Deacon <will.deacon@xxxxxxx>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
> Cc: kasan-dev@xxxxxxxxxxxxxxxx
> Cc: linux-mm@xxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Cc: x86@xxxxxxxxxx
> ---

Reviewed-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>