[dpdk-dev,v3] mempool: remove a redundant socket id assignment

Message ID 1480909144-34544-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
checkpatch/checkpatch success coding style OK

Commit Message

Zhao1, Wei Dec. 5, 2016, 3:39 a.m. UTC
  There is a redundant repetition mempool socket_id assignment in the
file rte_mempool.c in function rte_mempool_create_empty. The
statement "mp->socket_id = socket_id;"appear twice in line 821
and 824. One of them is redundant, so delete it.

Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---

v3:
--checkpatch warning fixed

v2:
--checkpatch error fixed

---
 lib/librte_mempool/rte_mempool.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Thomas Monjalon Dec. 6, 2016, 2:13 p.m. UTC | #1
2016-12-05 11:39, Wei Zhao:
> There is a redundant repetition mempool socket_id assignment in the
> file rte_mempool.c in function rte_mempool_create_empty. The
> statement "mp->socket_id = socket_id;"appear twice in line 821
> and 824. One of them is redundant, so delete it.
> 
> Fixes: 85226f9c526b ("mempool: introduce a function to create an empty pool")
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> Acked-by: John McNamara <john.mcnamara@intel.com>
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index aa513b9..1c2aed8 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -818,7 +818,6 @@  rte_mempool_create_empty(const char *name, unsigned n, unsigned elt_size,
 		goto exit_unlock;
 	}
 	mp->mz = mz;
-	mp->socket_id = socket_id;
 	mp->size = n;
 	mp->flags = flags;
 	mp->socket_id = socket_id;