From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id EAFC91B222 for ; Wed, 17 Jan 2018 05:04:17 +0100 (CET) Received: by mail-pl0-f68.google.com with SMTP id p5so7836425plo.12 for ; Tue, 16 Jan 2018 20:04:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zP8gCHGWqTZLAekngjg7/vhxNK5Rnt5vaWBvvA+lOUE=; b=e+j2TJD5Wjh1URnD4Ey0sWV1qJ/GCBGEnsPQDFT5GOsYM6RwQ8JF2RmrvLlrTQUVm8 tXNpyqiTGscEYG2aUkIorPr0SM+5AKlZj8nJedhfoFvwAAtRKHAnTHZsYa4RwvAUxxpn My6igRHENcEuiClSAtY5lnS8LiV1KqFbj56DFo7V/ECR9C2byBbR0GFia6FznKV6gPo2 Zt3fl2zGTj5Wb6iBftqxboIoXwvyLmccuY447TQn1S7qeADVYQz2ECPPc2r+LAMxr86X 1mMzOfyCYqML50q10ZWQHKaD0RrHtf/5zL13KXyAx6nai6ADlvmWJpE6GQSqaXJS3J6e 1qXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zP8gCHGWqTZLAekngjg7/vhxNK5Rnt5vaWBvvA+lOUE=; b=sqklF/REBopqTGaa1FQBzJu8RHNZqOhtLzjz4Lh5nZ2PnKKxYk+ZvAZulWjo32aXG5 U2pHPWJQQhlWTOBkm9+7r/ZNxbYzSMZPPyKJpnlSYRrPIzfG0oQhXYZI9iJW6LoApWF8 U6VFbcYqXcpuHKPNJ0d2R1Ohh65hyxiCzuBJx0rf837GGz03LCwNaMLG/6UwaPnJKmed ka1RsLID3Sdglo4ZrOYaIQ1wb6cFUPxAD74hKHOjiHPpgtAbXm7GSwrTYEByL3X0drGL xqWYKj718rceZNLR/ZbsPHRSKssRwXu32qrGQjKS/+FPJ9WEZ1ADcV7yfe56c6CeoNUu A4bw== X-Gm-Message-State: AKwxyteXujnYW7XsR8McI4/t7AdYoSFet5Hrq+yODQodUTTbzbqgyH+R 0eWZhDXLN7e5lmXI/jxU+Fxk4A== X-Google-Smtp-Source: ACJfBosg50si2oyD8U+OAZA1Ht18YZGjgsocjouFZIz8UGKh+iw2AGJycXE4VvR2s28V5/mlAmW20A== X-Received: by 10.84.175.67 with SMTP id s61mr12611218plb.3.1516161857144; Tue, 16 Jan 2018 20:04:17 -0800 (PST) Received: from localhost.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id b68sm3977759pfg.159.2018.01.16.20.04.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Jan 2018 20:04:16 -0800 (PST) From: Jia He To: dev@dpdk.org, Thomas Monjalon Cc: Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , konstantin.ananyev@intel.com, hemant.agrawal@nxp.com, Jia He , Jia He Date: Tue, 16 Jan 2018 20:03:49 -0800 Message-Id: <1516161831-28719-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516161831-28719-1-git-send-email-hejianet@gmail.com> References: <1516161831-28719-1-git-send-email-hejianet@gmail.com> Subject: [dpdk-dev] [PATCH v8 1/3] eal/arm64: remove the braces {} for dmb() and dsb() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2018 04:04:18 -0000 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