qcacmn: Add API to get first node of a list
Add QDF API to get the first node of a linked list. If the list is empty this API returns NULL. Change-Id: I4569941f708634085904fd30a347facca543594a CRs-Fixed: 3029987
This commit is contained in:

committed by
Madan Koyyalamudi

vanhempi
76ba042a40
commit
698478886e
@@ -107,6 +107,9 @@ static inline void qdf_list_create(__qdf_list_t *list, uint32_t max_size)
|
||||
#define qdf_list_for_each_from(list_ptr, cursor, node_field) \
|
||||
__qdf_list_for_each_from(list_ptr, cursor, node_field)
|
||||
|
||||
#define qdf_list_first_entry_or_null(list_ptr, type, node_field) \
|
||||
__qdf_list_first_entry_or_null(list_ptr, type, node_field)
|
||||
|
||||
/**
|
||||
* qdf_init_list_head() - initialize list head
|
||||
* @list_head: pointer to list head
|
||||
|
@@ -97,6 +97,9 @@ static inline uint32_t __qdf_list_max_size(__qdf_list_t *list)
|
||||
#define __qdf_list_for_each_from(list_ptr, cursor, node_field) \
|
||||
list_for_each_entry_from(cursor, &(list_ptr)->anchor, node_field)
|
||||
|
||||
#define __qdf_list_first_entry_or_null(list_ptr, type, node_field) \
|
||||
list_first_entry_or_null(&(list_ptr)->anchor, type, node_field)
|
||||
|
||||
/**
|
||||
* __qdf_init_list_head() - initialize list head
|
||||
* @list_head: pointer to list head
|
||||
|
Viittaa uudesa ongelmassa
Block a user