From: Jia He Date: Mon, 22 Jan 2018 04:41:26 +0000 (-0800) Subject: eal/arm64: remove the braces in memory barrier macros X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=59a3cae5305816b3739b4197d277f9455af53b9f;p=dpdk.git eal/arm64: remove the braces in memory barrier macros for the code as follows: if (condition) rte_smp_rmb(); else rte_smp_wmb(); Without this patch, compiler will report this error: error: 'else' without a previous 'if' Fixes: 84733fd0d75e ("eal/arm64: fix memory barrier definition") Cc: stable@dpdk.org Signed-off-by: Jia He Acked-by: Jerin Jacob Acked-by: Hemant Agrawal --- diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h index ee0d0d15ae..97060e4447 100644 --- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h +++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h @@ -15,8 +15,8 @@ extern "C" { #include "generic/rte_atomic.h" -#define dsb(opt) { asm volatile("dsb " #opt : : : "memory"); } -#define dmb(opt) { asm volatile("dmb " #opt : : : "memory"); } +#define dsb(opt) asm volatile("dsb " #opt : : : "memory") +#define dmb(opt) asm volatile("dmb " #opt : : : "memory") #define rte_mb() dsb(sy)