Skip to content

Commit ec73a7e

Browse files
committed
Clarify list_add documentation
Originally, the function list_add is said to insert a node at the beginning of a given list. However, it could also be used to insert a node after any existing node in the list. Therefore, this commit modifies its documentation to reflect the actual list manipulation performed by the function. The checksum of list.h is also updated. Change-Id: I661d7a0ebb876712c8ff75deef84370a51e62f1c
1 parent e3d96b3 commit ec73a7e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

list.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ static inline void INIT_LIST_HEAD(struct list_head *head)
9090
}
9191

9292
/**
93-
* list_add - Insert a node at the beginning of a circular list
93+
* list_add - Insert a node after a given node in a circular list
9494
* @node: Pointer to the list_head structure to add.
95-
* @head: Pointer to the list_head structure representing the list head.
95+
* @head: Pointer to the list_head structure after which to add the new node.
9696
*
9797
* Adds the specified @node immediately after @head in a circular doubly-linked
98-
* list, effectively placing it at the beginning. The existing first node, if
99-
* any, shifts to follow @node, and the list's circular structure is maintained.
98+
* list. The node that previously followed @head will now follow @node, and the
99+
* list's circular structure is maintained.
100100
*/
101101
static inline void list_add(struct list_head *node, struct list_head *head)
102102
{

scripts/checksums

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
db6784ff3917888db4d1dceaa0570d99ed40e762 queue.h
2-
9be9666430f392924f5d27caa71a412527bf9267 list.h
2+
5179cf8f5aafbc6cb8e8d7b898ef3798cfe85613 list.h
33
3bb0192cee08d165fd597a9f6fbb404533e28fcf scripts/check-commitlog.sh

0 commit comments

Comments
 (0)