From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by dpdk.org (Postfix) with ESMTP id AA42C56A1; Mon, 4 Dec 2017 02:50:46 +0100 (CET) Received: by mail-pg0-f66.google.com with SMTP id y6so7111390pgp.4; Sun, 03 Dec 2017 17:50:46 -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=mU5hsWdufN6h13IbwzUusm+Ey9rkqSwAu16tJfI5DG0=; b=Un9Z0axEQM7et5hPieHaZoB74dcUW9x9OCTXaZEd/LF+ZZf4QSIQGjt+nq5uDqR3ro ZSHf51MUx6dMgMVGXrR1A3+pqYSdJ3rqluHzoQOdm5DiOdRPRK5k3V56BDWhqHkoMY6A PvrBrJh5uvZ6fCBdjAZa2gp52THznichsyaEWr9MaepcflHLsrXmS3fhSkLaXdaqSri0 Rx8C9Kg5J6tJZipVbEVCh0chl7pWJAXw5thCNjwlls1gXJhj8gPDFRhPJ+Uy98S6VL1L s1+PAY54L8zEODBKgwi/4Jw1M5oZh4td9XrM/rSHwwZa2+9FBWecPfpCYYoz1caOfPUN 4khA== 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=mU5hsWdufN6h13IbwzUusm+Ey9rkqSwAu16tJfI5DG0=; b=nui7Nu6/FAi6usaaVRZdi1p3uB/psOD/Zaqsq6UlElk+R75P8HrOmwk9kjCwJolqOM QFzH5GqeETuPhUQMyJeQbLi+OFpzX47jDoh5OqxE/6o1d8x+IGGYPCGNfEKbgAFpO69t qpb8O6T2Bp5hT/zZPicMgx1A0yEkvpRX9LLz6hAAzgerNldfPou2O1qMfXZxwyzr8rbn FB6u0wPqYlQsRjPOF4TwD9FXjH7ps7GEOL3v5wi4ibvaXAFGa2ItvWypWTznH/4MAKGS 0dZqYEOdJYGulx/ni3f53QMWVLuW69LNIP/pQpUTaaBAeUBhRtvut2M6H7VWqDy+GAC0 08Ug== X-Gm-Message-State: AJaThX7TJyZtfbBLHVsYyiaRONP90ZuHqFjuwP/G+LS+IDdui+HJT6+h ke2UYriCjUjTfnZU0eAewbcUPQ== X-Google-Smtp-Source: AGs4zMaldAuYmOgbfwr3SykjVIyUrhPwVRLGMqGCeY3xYjIxCFCrx4+sLqKkjIN1uLL5iWydDklM7A== X-Received: by 10.98.166.84 with SMTP id t81mr17700222pfe.196.1512352245740; Sun, 03 Dec 2017 17:50:45 -0800 (PST) Received: from localhost.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id k23sm23503121pfj.22.2017.12.03.17.50.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 Dec 2017 17:50:45 -0800 (PST) From: Jia He To: dev@dpdk.org, Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , Thomas Monjalon Cc: konstantin.ananyev@intel.com, hemant.agrawal@nxp.com, Jia He , stable@dpdk.org, Jia He Date: Sun, 3 Dec 2017 17:50:10 -0800 Message-Id: <1512352212-7191-2-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512352212-7191-1-git-send-email-hejianet@gmail.com> References: <1511748024-7245-1-git-send-email-hejianet@gmail.com> <1512352212-7191-1-git-send-email-hejianet@gmail.com> Subject: [dpdk-dev] [PATCH V7 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, 04 Dec 2017 01:50:47 -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") Cc: stable@dpdk.org 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 0b70d62..71da29c 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 @@ -43,8 +43,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