From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 163ECA00BE;
	Tue,  7 Jul 2020 13:14:55 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id F18801DE05;
	Tue,  7 Jul 2020 13:14:46 +0200 (CEST)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
 by dpdk.org (Postfix) with ESMTP id 3B8731DDEA
 for <dev@dpdk.org>; Tue,  7 Jul 2020 13:14:45 +0200 (CEST)
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
 by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB5341042;
 Tue,  7 Jul 2020 04:14:44 -0700 (PDT)
Received: from phil-VirtualBox.shanghai.arm.com
 (phil-VirtualBox.shanghai.arm.com [10.169.109.153])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C0F613F71E;
 Tue,  7 Jul 2020 04:14:40 -0700 (PDT)
From: Phil Yang <phil.yang@arm.com>
To: thomas@monjalon.net,
	erik.g.carrillo@intel.com,
	dev@dpdk.org
Cc: jerinj@marvell.com, Honnappa.Nagarahalli@arm.com, drc@linux.vnet.ibm.com,
 Ruifeng.Wang@arm.com, Dharmik.Thakkar@arm.com, nd@arm.com,
 david.marchand@redhat.com, mdr@ashroe.eu, nhorman@tuxdriver.com,
 dodji@redhat.com
Date: Tue,  7 Jul 2020 19:13:22 +0800
Message-Id: <1594120403-17643-3-git-send-email-phil.yang@arm.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1594120403-17643-1-git-send-email-phil.yang@arm.com>
References: <1593667604-12029-1-git-send-email-phil.yang@arm.com>
 <1594120403-17643-1-git-send-email-phil.yang@arm.com>
Subject: [dpdk-dev] [PATCH v3 3/4] eventdev: remove redundant code
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

There is no thread will access these impl_opaque data after timer
canceled. When new timer armed, it got refilled. So the cleanup
process is unnecessary.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
---
 lib/librte_eventdev/rte_event_timer_adapter.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index 6d01a34..d75415c 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -1167,8 +1167,6 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
 		rte_mempool_put(sw->tim_pool, (void **)timp);
 
 		evtims[i]->state = RTE_EVENT_TIMER_CANCELED;
-		evtims[i]->impl_opaque[0] = 0;
-		evtims[i]->impl_opaque[1] = 0;
 
 		rte_smp_wmb();
 	}
-- 
2.7.4