Skip to content

Commit 29d90ea

Browse files
authored
Merge pull request #225 from SimonLiu423/docs/clarify-list-add
Clarify list_add documentation
2 parents 474f638 + 13d8a6f commit 29d90ea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: list.h

+4-4
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
{

Diff for: scripts/checksums

+1-1
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)