From 13d8a6f91ee78f20a3182dfc0e52f31b82a6713a Mon Sep 17 00:00:00 2001 From: Simon Liu Date: Tue, 4 Mar 2025 07:20:02 +0000 Subject: [PATCH] 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. Change-Id: I661d7a0ebb876712c8ff75deef84370a51e62f1c --- list.h | 8 ++++---- scripts/checksums | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/list.h b/list.h index 1176e3ce4..9ce397d30 100644 --- a/list.h +++ b/list.h @@ -90,13 +90,13 @@ static inline void INIT_LIST_HEAD(struct list_head *head) } /** - * list_add - Insert a node at the beginning of a circular list + * list_add - Insert a node after a given node in a circular list * @node: Pointer to the list_head structure to add. - * @head: Pointer to the list_head structure representing the list head. + * @head: Pointer to the list_head structure after which to add the new node. * * Adds the specified @node immediately after @head in a circular doubly-linked - * list, effectively placing it at the beginning. The existing first node, if - * any, shifts to follow @node, and the list's circular structure is maintained. + * list. The node that previously followed @head will now follow @node, and the + * list's circular structure is maintained. */ static inline void list_add(struct list_head *node, struct list_head *head) { diff --git a/scripts/checksums b/scripts/checksums index 533a53afd..e8fadf516 100644 --- a/scripts/checksums +++ b/scripts/checksums @@ -1,3 +1,3 @@ 398b59c23f699ff1bf1e73a94503a9a91caa9207 queue.h -9be9666430f392924f5d27caa71a412527bf9267 list.h +5179cf8f5aafbc6cb8e8d7b898ef3798cfe85613 list.h 1029c2784b4cae3909190c64f53a06cba12ea38e scripts/check-commitlog.sh