arm64: cmpxchg: update macros to prevent warnings
authorMark Hambleton <mahamble@broadcom.com>
Mon, 2 Dec 2013 18:10:44 +0000 (18:10 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 11 Dec 2013 22:40:08 +0000 (22:40 +0000)
commit26b545351664d9ec3a7f9aff4100a05558c8db84
tree5f5a8c15d2335266535ce3f5346dec7ae73411e7
parent98ff17449dd2a9f3bb664120a95ada62d1984acb
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]

[In review upstream -- broonie]

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