Skip to content

Commit 415828f

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 474f638 commit 415828f

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
398b59c23f699ff1bf1e73a94503a9a91caa9207 queue.h
2-
9be9666430f392924f5d27caa71a412527bf9267 list.h
2+
5179cf8f5aafbc6cb8e8d7b898ef3798cfe85613 list.h
33
1029c2784b4cae3909190c64f53a06cba12ea38e scripts/check-commitlog.sh

0 commit comments

Comments
 (0)