diff mbox

[API-NEXT,PATCHv2,2/6] linux-gen: pktio ipc: more accurate settings of pool flags

Message ID 1481655217-30447-3-git-send-email-maxim.uvarov@linaro.org
State Superseded
Headers show

Commit Message

Maxim Uvarov Dec. 13, 2016, 6:53 p.m. UTC
Make code more accurate and nice view, no functional changes.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 platform/linux-generic/odp_pool.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

-- 
2.7.1.250.gff4ea60
diff mbox

Patch

diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
index 4be3827..cae2759 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -497,14 +497,17 @@  static int check_params(odp_pool_param_t *params)
 
 odp_pool_t odp_pool_create(const char *name, odp_pool_param_t *params)
 {
+	uint32_t shm_flags = 0;
+
+	if (check_params(params))
+		return ODP_POOL_INVALID;
+
 #ifdef _ODP_PKTIO_IPC
 	if (params && (params->type == ODP_POOL_PACKET))
-		return pool_create(name, params, ODP_SHM_PROC);
+		shm_flags = ODP_SHM_PROC;
 #endif
-	if (check_params(params))
-		return ODP_POOL_INVALID;
 
-	return pool_create(name, params, 0);
+	return pool_create(name, params, shm_flags);
 }
 
 int odp_pool_destroy(odp_pool_t pool_hdl)