From 9bac3426aef1b04ff8808f9eb88091a23fc12d16 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Thu, 28 Jun 2018 14:03:43 -0700 Subject: [PATCH] env: Remove unhelpful const in spdk_mempool_put_bulk This const makes the array passed in immutable, but that isn't helpful or interesting since it just contains invalid pointer addresses. It may also make sense in the future to NULL out the addresses in the array in a debug build. So drop the const. Change-Id: I921551c7cb1dbf6c765fb301c31906b8b93b7f16 Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/417362 Reviewed-by: Daniel Verkamp Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto Tested-by: SPDK Automated Test System --- include/spdk/env.h | 2 +- lib/env_dpdk/env.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spdk/env.h b/include/spdk/env.h index 57194d37e..c401f55b3 100644 --- a/include/spdk/env.h +++ b/include/spdk/env.h @@ -370,7 +370,7 @@ void spdk_mempool_put(struct spdk_mempool *mp, void *ele); * \param ele_arr Array of the elements to put. * \param count Count of elements to put. */ -void spdk_mempool_put_bulk(struct spdk_mempool *mp, void *const *ele_arr, size_t count); +void spdk_mempool_put_bulk(struct spdk_mempool *mp, void **ele_arr, size_t count); /** * Get the number of entries in the memory pool. diff --git a/lib/env_dpdk/env.c b/lib/env_dpdk/env.c index 86eaed58b..bcbe305ec 100644 --- a/lib/env_dpdk/env.c +++ b/lib/env_dpdk/env.c @@ -260,7 +260,7 @@ spdk_mempool_put(struct spdk_mempool *mp, void *ele) } void -spdk_mempool_put_bulk(struct spdk_mempool *mp, void *const *ele_arr, size_t count) +spdk_mempool_put_bulk(struct spdk_mempool *mp, void **ele_arr, size_t count) { rte_mempool_put_bulk((struct rte_mempool *)mp, ele_arr, count); }