eal/arm: fix debug build with gcc for 128-bit atomics
authorJoyce Kong <joyce.kong@arm.com>
Fri, 15 Jan 2021 09:58:21 +0000 (17:58 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 27 Jan 2021 10:21:21 +0000 (11:21 +0100)
commit36d406c5139fa0160a1d3686f5b2413a2f9ee83b
tree4fa6fc5d81102806088658f8b993f11cc456f1a4
parent6a2cf58a045f58c9744194f4d44394c7af1a0027
eal/arm: fix debug build with gcc for 128-bit atomics

Compiling with "meson build -Dbuildtype=debug --cross-file
config/arm/arm64_thunderx2_linux_gcc" shows the warnings
"function returns an aggregate [-Waggregate-return]":
../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h: In
function ‘__cas_128_relaxed’:
../../dpdk/lib/librte_eal/arm/include/rte_atomic_64.h:81:20:
error: function returns an aggregate [-Werror=aggregate-return]
 __ATOMIC128_CAS_OP(__cas_128_relaxed, "casp")
                    ^~~~~~~~~~~~~~~~~

Fix the compiling issue by defining __ATOMIC128_CAS_OP as a void
function and passing the address pointer into it.

Fixes: 7e2c3e17fe2c ("eal/arm64: add 128-bit atomic compare exchange")
Cc: stable@dpdk.org
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
lib/librte_eal/arm/include/rte_atomic_64.h