From: Nathael Pajani Date: Thu, 21 Sep 2023 22:27:01 +0000 (+0200) Subject: Change terminology : "entry" becomes "element". X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=11001833f506238a779c0d25f0dabfda1f145b1f;p=soft%2Flpc122x%2Fcore Change terminology : "entry" becomes "element". No functionnal changes. --- diff --git a/include/lib/list.h b/include/lib/list.h index a41bc12..41f3678 100644 --- a/include/lib/list.h +++ b/include/lib/list.h @@ -41,10 +41,10 @@ static inline void INIT_LIST_HEAD(struct list_head* list) } /* - * Insert a new entry between two known consecutive entries. + * Insert a new element between two known consecutive elements. * * This is only for internal list manipulation where we know - * the prev/next entries already! + * the prev/next elements already! */ static inline void __list_add(struct list_head* new, struct list_head* prev, struct list_head* next) { @@ -55,11 +55,11 @@ static inline void __list_add(struct list_head* new, struct list_head* prev, str } /** - * list_add - add a new entry - * @new: new entry to be added + * list_add - add a new element + * @new: new element to be added * @head: list head to add it after * - * Insert a new entry after the specified head. + * Insert a new element after the specified head. * This is good for implementing stacks. */ static inline void list_add(struct list_head* new, struct list_head* head) @@ -68,11 +68,11 @@ static inline void list_add(struct list_head* new, struct list_head* head) } /** - * list_add_tail - add a new entry - * @new: new entry to be added + * list_add_tail - add a new element + * @new: new element to be added * @head: list head to add it before * - * Insert a new entry before the specified head. + * Insert a new element before the specified head. * This is useful for implementing queues. */ static inline void list_add_tail(struct list_head* new, struct list_head* head) @@ -81,11 +81,11 @@ static inline void list_add_tail(struct list_head* new, struct list_head* head) } /* - * Delete a list entry by making the prev/next entries + * Delete a list element by making the prev/next enlements * point to each other. * * This is only for internal list manipulation where we know - * the prev/next entries already! + * the prev/next elements already! */ static inline void __list_del(struct list_head* prev, struct list_head* next) { @@ -93,33 +93,33 @@ static inline void __list_del(struct list_head* prev, struct list_head* next) prev->next = next; } -static inline void list_del(struct list_head* entry) +static inline void list_del(struct list_head* elem) { - __list_del(entry->prev, entry->next); - entry->next = NULL; - entry->prev = NULL; + __list_del(elem->prev, elem->next); + elem->next = NULL; + elem->prev = NULL; } /** - * list_is_last - tests whether @list is the last entry in list @head - * @list: the entry to test + * list_is_last - tests whether @elem is the last element in list @head + * @elem: the element to test * @head: the head of the list */ -static inline int list_is_last(const struct list_head* list, const struct list_head* head) +static inline int list_is_last(const struct list_head* elem, const struct list_head* head) { - return list->next == head; + return elem->next == head; } /** * list_move_tail - delete from one list and add as another's tail - * @list: the entry to move - * @head: the head that will follow our entry + * @elem: the element to move + * @head: the head that will follow our elem */ -static inline void list_move_tail(struct list_head* list, +static inline void list_move_tail(struct list_head* elem, struct list_head* head) { - list_del(list); - list_add_tail(list, head); + list_del(elem); + list_add_tail(elem, head); } @@ -148,7 +148,7 @@ static inline void list_rotate_left(struct list_head* head) /** - * list_entry - get the struct for this entry + * list_entry - get the container struct for this element * @ptr: the &struct list_head pointer. * @type: the type of the struct this is embedded in. * @member: the name of the list_struct within the struct.