[dpdk-stable] patch 'spinlock/x86: move stack declaration before code' has been queued to LTS release 16.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 15 19:19:05 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/16/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 90e0fc9fb6639f78c7daa8b849574775c80fbbdb Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Sat, 12 May 2018 09:59:17 +0800
Subject: [PATCH] spinlock/x86: move stack declaration before code

[ upstream commit f7f18e92a51276f1e23a0595f59615f79323b358 ]

In function 'rte_try_tm':
rte_spinlock.h:82:2:
warning: ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
  int retries = RTE_RTM_MAX_RETRIES;

Fixes: ba7468997ea6 ("spinlock: add HTM lock elision for x86")

Signed-off-by: Andy Green <andy at warmcat.com>
Reviewed-by: Stephen Hemminger <stephen at networkplumber.org>
---
 lib/librte_eal/common/include/arch/x86/rte_spinlock.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_spinlock.h b/lib/librte_eal/common/include/arch/x86/rte_spinlock.h
index 8e630c219..577236a3e 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_spinlock.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_spinlock.h
@@ -104,10 +104,12 @@ static inline int rte_tm_supported(void)
 static inline int
 rte_try_tm(volatile int *lock)
 {
+	int retries;
+
 	if (!rte_rtm_supported)
 		return 0;
 
-	int retries = RTE_RTM_MAX_RETRIES;
+	retries = RTE_RTM_MAX_RETRIES;
 
 	while (likely(retries--)) {
 
-- 
2.14.2



More information about the stable mailing list