summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2018-06-09 16:27:44 +0300
committerMichael Bestas <mkbestas@lineageos.org>2019-10-23 01:12:56 +0300
commitb989cae4900c6647bd5fddfd9930c01e999025ea (patch)
treea961a859e5574740d7177180eb2ccd4bf1269267
parentc9ed433d24c2807a33a25ed42ec57526063ac127 (diff)
downloadvendor_qcom_opensource_power-b989cae4900c6647bd5fddfd9930c01e999025ea.tar.gz
vendor_qcom_opensource_power-b989cae4900c6647bd5fddfd9930c01e999025ea.tar.bz2
vendor_qcom_opensource_power-b989cae4900c6647bd5fddfd9930c01e999025ea.zip
power: Remove unused list utils
* They were added in 6ec1206b246a164acfb0aa7b43af9b04c759063e but never used Change-Id: I0f0d0336cd91715eb8aa4dcb42ae1e449da8603b
-rw-r--r--list.c26
-rw-r--r--list.h2
2 files changed, 0 insertions, 28 deletions
diff --git a/list.c b/list.c
index d1cceaf..75c74ca 100644
--- a/list.c
+++ b/list.c
@@ -34,14 +34,6 @@
#include <log/log.h>
#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;
diff --git a/list.h b/list.h
index 6e81d98..db666f2 100644
--- a/list.h
+++ b/list.h
@@ -34,8 +34,6 @@ struct list_node {
void (*dump)(void* data);
};
-int init_list_head(struct list_node* head);
struct list_node* add_list_node(struct list_node* head, void* data);
int remove_list_node(struct list_node* head, struct list_node* del_node);
-void dump_list(struct list_node* head);
struct list_node* find_node(struct list_node* head, void* comparison_data);