From b989cae4900c6647bd5fddfd9930c01e999025ea Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Sat, 9 Jun 2018 16:27:44 +0300 Subject: power: Remove unused list utils * They were added in 6ec1206b246a164acfb0aa7b43af9b04c759063e but never used Change-Id: I0f0d0336cd91715eb8aa4dcb42ae1e449da8603b --- list.c | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'list.c') diff --git a/list.c b/list.c index d1cceaf..75c74ca 100644 --- a/list.c +++ b/list.c @@ -34,14 +34,6 @@ #include #include "list.h" -int init_list_head(struct list_node* head) { - if (head == NULL) return -1; - - memset(head, 0, sizeof(*head)); - - return 0; -} - struct list_node* add_list_node(struct list_node* head, void* data) { /* Create a new list_node. And put 'data' into it. */ struct list_node* new_node; @@ -63,10 +55,6 @@ struct list_node* add_list_node(struct list_node* head, void* data) { return new_node; } -int is_list_empty(struct list_node* head) { - return (head == NULL || head->next == NULL); -} - /* * Delink and de-allocate 'node'. */ @@ -102,20 +90,6 @@ int remove_list_node(struct list_node* head, struct list_node* del_node) { return 0; } -void dump_list(struct list_node* head) { - struct list_node* current_node = head; - - if (head == NULL) return; - - ALOGV("List:\n"); - - while ((current_node = current_node->next)) { - if (current_node->dump) { - current_node->dump(current_node->data); - } - } -} - struct list_node* find_node(struct list_node* head, void* comparison_data) { struct list_node* current_node = head; -- cgit v1.2.3