From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jia He Subject: [PATCH v9 1/3] eal/arm64: remove the braces {} for dmb() and dsb() Date: Sun, 21 Jan 2018 20:41:26 -0800 Message-ID: <1516596088-10364-2-git-send-email-hejianet@gmail.com> References: <1516161831-28719-1-git-send-email-hejianet@gmail.com> <1516596088-10364-1-git-send-email-hejianet@gmail.com> Cc: Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , konstantin.ananyev@intel.com, bruce.richardson@intel.com, Jia He , Jia He To: dev@dpdk.org, Thomas Monjalon , Hemant Agrawal Return-path: Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by dpdk.org (Postfix) with ESMTP id 6381EA48D for ; Mon, 22 Jan 2018 05:41:55 +0100 (CET) Received: by mail-pf0-f194.google.com with SMTP id t12so6183376pfg.2 for ; Sun, 21 Jan 2018 20:41:55 -0800 (PST) In-Reply-To: <1516596088-10364-1-git-send-email-hejianet@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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") Signed-off-by: Jia He Acked-by: Jerin Jacob --- lib/librte_eal/common/include/arch/arm/rte_atomic_64.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 b6bbd0b..10ccf14 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) -- 2.7.4