diff mbox

[API-NEXT,v3,6/9] odp_timer_test: remove redundant free function

Message ID 1433526691-20058-7-git-send-email-zoltan.kiss@linaro.org
State Superseded
Headers show

Commit Message

Zoltan Kiss June 5, 2015, 5:51 p.m. UTC
Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---
 example/timer/odp_timer_test.c | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)
diff mbox

Patch

diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c
index 5e4306e..735c4c6 100644
--- a/example/timer/odp_timer_test.c
+++ b/example/timer/odp_timer_test.c
@@ -66,30 +66,6 @@  static const char *timerset2str(odp_timer_set_t val)
 	}
 };
 
-
-/** @private test timeout */
-static void free_event(odp_event_t ev)
-{
-	switch (odp_event_type(ev)) {
-	case ODP_EVENT_BUFFER:
-		odp_buffer_free(odp_buffer_from_event(ev));
-		break;
-	case ODP_EVENT_PACKET:
-		odp_packet_free(odp_packet_from_event(ev));
-		break;
-	case ODP_EVENT_TIMEOUT:
-		odp_timeout_free(odp_timeout_from_event(ev));
-		break;
-	case ODP_EVENT_CRYPTO_COMPL:
-		odp_crypto_compl_free(odp_crypto_compl_from_event(ev));
-		break;
-	default:
-		fprintf(stderr, "Unrecognized event type %d\n",
-			odp_event_type(ev));
-		abort();
-	}
-}
-
 /** @private test timeout */
 static void remove_prescheduled_events(void)
 {
@@ -98,7 +74,7 @@  static void remove_prescheduled_events(void)
 	odp_schedule_pause();
 	while ((ev = odp_schedule(&queue, ODP_SCHED_NO_WAIT)) !=
 			ODP_EVENT_INVALID) {
-		free_event(ev);
+		odp_event_free(ev);
 	}
 }