[dpdk-stable] patch 'malloc: fix style in free list index computation' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Nov 25 10:02:56 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6cd180318fe67a6d9fc0d0eb307f38d1a254374b

Thanks.

Luca Boccassi

---
>From 6cd180318fe67a6d9fc0d0eb307f38d1a254374b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Thu, 12 Nov 2020 17:31:15 +0800
Subject: [PATCH] malloc: fix style in free list index computation

[ upstream commit a99d2521a3b8e33c34eb8fdf5719c0e8f0cf07a7 ]

Cleanup code style issue reported by kernel checkpatch. As follows:
  * ERROR:CODE_INDENT: code indent should use tabs where possible
  * ERROR:SPACING: spaces required around that '?' (ctx:VxE)
  * WARNING:INDENTED_LABEL: labels should not be indented

Fixes: b0489e7bca2f ("malloc: fix linear complexity")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/librte_eal/common/malloc_elem.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 51cdfc5d59..a0f2d22774 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -382,14 +382,14 @@ malloc_elem_free_list_index(size_t size)
 		return 0;
 
 	/* Find next power of 2 >= size. */
-	log2 = sizeof(size) * 8 - __builtin_clzl(size-1);
+	log2 = sizeof(size) * 8 - __builtin_clzl(size - 1);
 
 	/* Compute freelist index, based on log2(size). */
 	index = (log2 - MALLOC_MINSIZE_LOG2 + MALLOC_LOG2_INCREMENT - 1) /
-	        MALLOC_LOG2_INCREMENT;
+			MALLOC_LOG2_INCREMENT;
 
-	return index <= RTE_HEAP_NUM_FREELISTS-1?
-	        index: RTE_HEAP_NUM_FREELISTS-1;
+	return index <= RTE_HEAP_NUM_FREELISTS - 1 ?
+			index : RTE_HEAP_NUM_FREELISTS - 1;
 }
 
 /*
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:37.146359551 +0000
+++ 0014-malloc-fix-style-in-free-list-index-computation.patch	2020-11-24 16:50:36.577496485 +0000
@@ -1 +1 @@
-From a99d2521a3b8e33c34eb8fdf5719c0e8f0cf07a7 Mon Sep 17 00:00:00 2001
+From 6cd180318fe67a6d9fc0d0eb307f38d1a254374b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a99d2521a3b8e33c34eb8fdf5719c0e8f0cf07a7 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index c70112f84d..c2c9461f1d 100644
+index 51cdfc5d59..a0f2d22774 100644
@@ -24 +25 @@
-@@ -391,14 +391,14 @@ malloc_elem_free_list_index(size_t size)
+@@ -382,14 +382,14 @@ malloc_elem_free_list_index(size_t size)


More information about the stable mailing list