qcacmn: Add API to get last entry of linked list
Add API to get last entry of linked list. CRs-Fixed: 3386125 Change-Id: Id956f3976f4c7651ef367e44c1c430f6eea8d2f9
This commit is contained in:

committed by
Madan Koyyalamudi

parent
0ce3a8e549
commit
49b0a152b5
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2018, 2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018, 2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -110,6 +111,9 @@ static inline void qdf_list_create(__qdf_list_t *list, uint32_t max_size)
|
|||||||
#define qdf_list_first_entry_or_null(list_ptr, type, 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_list_first_entry_or_null(list_ptr, type, node_field)
|
||||||
|
|
||||||
|
#define qdf_list_last_entry(list_ptr, type, node_field) \
|
||||||
|
__qdf_list_last_entry(list_ptr, type, node_field)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qdf_init_list_head() - initialize list head
|
* qdf_init_list_head() - initialize list head
|
||||||
* @list_head: pointer to list head
|
* @list_head: pointer to list head
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2016, 2018, 2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2016, 2018, 2021 The Linux Foundation. All rights reserved.
|
||||||
|
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -100,6 +101,9 @@ static inline uint32_t __qdf_list_max_size(__qdf_list_t *list)
|
|||||||
#define __qdf_list_first_entry_or_null(list_ptr, type, 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)
|
list_first_entry_or_null(&(list_ptr)->anchor, type, node_field)
|
||||||
|
|
||||||
|
#define __qdf_list_last_entry(list_ptr, type, node_field) \
|
||||||
|
list_last_entry(&(list_ptr)->anchor, type, node_field)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __qdf_init_list_head() - initialize list head
|
* __qdf_init_list_head() - initialize list head
|
||||||
* @list_head: pointer to list head
|
* @list_head: pointer to list head
|
||||||
|
Reference in New Issue
Block a user