From patchwork Mon Dec 5 03:39:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 17670 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 753A458CB; Mon, 5 Dec 2016 04:42:47 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 409504B79 for ; Mon, 5 Dec 2016 04:42:45 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP; 04 Dec 2016 19:42:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,302,1477983600"; d="scan'208";a="38940585" Received: from dpdk1.bj.intel.com ([172.16.182.84]) by fmsmga006.fm.intel.com with ESMTP; 04 Dec 2016 19:42:43 -0800 From: Wei Zhao To: dev@dpdk.org Cc: olivier.matz@6wind.com, Wei Zhao Date: Mon, 5 Dec 2016 11:39:04 +0800 Message-Id: <1480909144-34544-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH v3] mempool: remove a redundant socket id assignment X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: John McNamara Acked-by: Olivier Matz --- v3: --checkpatch warning fixed v2: --checkpatch error fixed --- lib/librte_mempool/rte_mempool.c | 1 - 1 file changed, 1 deletion(-) 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;