From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=jy4cV43CfAAgBbe664dOYF2zfnFezZInpmZ7LdJUw2YRLaiwaEU52lSmiycONqi+gh xQHEfeLXUsympCMgccgDzXEPECbnxxewv1hvbrb7X0+E0u9t8s4pT8YJxsXWT4YjsgVt 64N9M5Q2h4QVRNrS76kHmqGjrT+m6T1+eZEMPNyR+E/Puq6rNcEYRN25cQLg1wi/Lke0 +0oObTbMBWYFkWr7mITwOqoiZCOnszzbyrywB46VbBoGq3zsSDaz/en1lWpZ7sQ8rk2i xutZa0MJhG8G0huRrwFG2eRxSNYk3fg6Wiy7ur3rH/SHFIAWRHk3SAlLzTcbfXt4EvEF L9mg== 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=JFyIliESCEbH2GhViXXvd/d2A9VH2dVsmYpn88J8LjW0O4v82MZGjJWy4mcNnAyfwZ yXBqLA7qJ6jgDUVKzgPbLSxagxJR3VIra/plzqtCN+AmCyLhLo9OUCiZy/wWEpkL3rzi pUAbWUmpnchYNJaoPd6egfiBF4oiITGZR/58LbHVAOF/n7X71WS6IvG+zOQZ1aqJQPUR BiLsi7NY1m+p0PMxO0QXJ3FVSvYQwxQPTumK50dy+baNw6KXAXSSGetbwO1e2/b2DHz6 5M0PLqj8pzCDZekBf+CAsKUtMG9V7NDMqSu/bWS/ubw3YL8OuovIavTISeawO4Zu/VBK 6NQg== X-Gm-Message-State: AKwxytfsY/xA7cpBk78q1fnVz6L5sdZY5RnbSInfvOZfDAQ+mbtRpjEI +bvQ1UTK7QEcY/ts5VN/HdrtEg== X-Google-Smtp-Source: AH8x227xcM2s/ztH6/Sfp4PrQOMK/irjrFBQixqegra5pARPzVnAqgWWFfNFZxTVLFEumANNbJIPmA== X-Received: by 10.101.74.5 with SMTP id s5mr6481826pgq.105.1516596114498; Sun, 21 Jan 2018 20:41:54 -0800 (PST) Received: from localhost.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id m24sm29347372pfj.184.2018.01.21.20.41.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 Jan 2018 20:41:54 -0800 (PST) From: Jia He To: dev@dpdk.org, Thomas Monjalon , Hemant Agrawal Cc: Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , konstantin.ananyev@intel.com, bruce.richardson@intel.com, Jia He , Jia He Date: Sun, 21 Jan 2018 20:41:26 -0800 Message-Id: <1516596088-10364-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516596088-10364-1-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> Subject: [dpdk-dev] [PATCH v9 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: Mon, 22 Jan 2018 04:41:55 -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