arm64: cmpxchg: update macros to prevent warnings
authorMark Hambleton <mahamble@broadcom.com>
Tue, 3 Dec 2013 19:19:12 +0000 (19:19 +0000)
committerGreg Hackmann <ghackmann@google.com>
Tue, 25 Feb 2014 18:10:09 +0000 (10:10 -0800)
commita34c461af47c7ae9232ac42f62ab450a7a4120e5
tree72d0bbcb1ea7b0e7f62a7731ecbd8c21177d6de7
parent243a7e84f6527d8c150aacd2c18039219d553a64
arm64: cmpxchg: update macros to prevent warnings

Make sure the value we are going to return is referenced in order to
avoid warnings from newer GCCs such as:

arch/arm64/include/asm/cmpxchg.h:162:3: warning: value computed is not used [-Wunused-value]
  ((__typeof__(*(ptr)))__cmpxchg_mb((ptr),   \
   ^
net/netfilter/nf_conntrack_core.c:674:2: note: in expansion of macro ‘cmpxchg’
  cmpxchg(&nf_conntrack_hash_rnd, 0, rand);

[Modified to use the current underlying implementation as current
mainline for both cmpxchg() and cmpxchg_local() does -- broonie]

Signed-off-by: Mark Hambleton <mahamble@broadcom.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cmpxchg.h