Orginal comments for the function list_del() and other related
functions all described the entry to be removed from the list as
"delete", such as __list_del() , list_del_init() and so on.
However the usage of "delete" in the comments of those functions is
misleading. "Delete" means erase, while "remove" means take away and set
aside. We do not perform any operations to erase the memory location or
any content in the entry in those functions mentioned above, we simply
"removes" the entry from the list, that is why "remove" is a correct
and more preferred word for the description in the comments for the
function list_del() and its related functions.
Signed-off-by: I-HSIN CHENG <[email protected]>
---
include/linux/list.h | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/linux/list.h b/include/linux/list.h
index 164b4d0e9..aefd111a6 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -184,7 +184,7 @@ static inline void list_add_tail(struct list_head *new, struct list_head *head)
}
/*
- * Delete a list entry by making the prev/next entries
+ * Remove a list entry by making the prev/next entries
* point to each other.
*
* This is only for internal list manipulation where we know
@@ -197,7 +197,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next)
}
/*
- * Delete a list entry and clear the 'prev' pointer.
+ * Remove a list entry and clear the 'prev' pointer.
*
* This is a special-purpose list clearing method used in the networking code
* for lists allocated as per-cpu, where we don't want to incur the extra
@@ -219,8 +219,8 @@ static inline void __list_del_entry(struct list_head *entry)
}
/**
- * list_del - deletes entry from list.
- * @entry: the element to delete from the list.
+ * list_del - removes entry from list.
+ * @entry: the element to remove from the list.
* Note: list_empty() on entry does not return true after this, the entry is
* in an undefined state.
*/
@@ -279,8 +279,8 @@ static inline void list_swap(struct list_head *entry1,
}
/**
- * list_del_init - deletes entry from list and reinitialize it.
- * @entry: the element to delete from the list.
+ * list_del_init - removes entry from list and reinitialize it.
+ * @entry: the element to remove from the list.
*/
static inline void list_del_init(struct list_head *entry)
{
@@ -289,7 +289,7 @@ static inline void list_del_init(struct list_head *entry)
}
/**
- * list_move - delete from one list and add as another's head
+ * list_move - remove from one list and add as another's head
* @list: the entry to move
* @head: the head that will precede our entry
*/
@@ -300,7 +300,7 @@ static inline void list_move(struct list_head *list, struct list_head *head)
}
/**
- * list_move_tail - delete from one list and add as another's tail
+ * list_move_tail - remove from one list and add as another's tail
* @list: the entry to move
* @head: the head that will follow our entry
*/
@@ -374,7 +374,7 @@ static inline int list_empty(const struct list_head *head)
}
/**
- * list_del_init_careful - deletes entry from list and reinitialize it.
+ * list_del_init_careful - removes entry from list and reinitialize it.
* @entry: the element to delete from the list.
*
* This is the same as list_del_init(), except designed to be used
@@ -983,8 +983,8 @@ static inline void __hlist_del(struct hlist_node *n)
}
/**
- * hlist_del - Delete the specified hlist_node from its list
- * @n: Node to delete.
+ * hlist_del - Remove the specified hlist_node from its list
+ * @n: Node to remove.
*
* Note that this function leaves the node in hashed state. Use
* hlist_del_init() or similar instead to unhash @n.
@@ -997,8 +997,8 @@ static inline void hlist_del(struct hlist_node *n)
}
/**
- * hlist_del_init - Delete the specified hlist_node from its list and initialize
- * @n: Node to delete.
+ * hlist_del_init - Remove the specified hlist_node from its list and initialize
+ * @n: Node to remove.
*
* Note that this function leaves the node in unhashed state.
*/
--
2.34.1