Skip to content

Commit c84716c

Browse files
NeilBrownJiri Kosina
authored andcommitted
list/hashtable: minor documentation corrections.
hash_for_each_safe() and hash_for_each_possible_safe() need to be passed a temp 'struct hlist_node' pointer, but do not say that in the documentation - they just say a 'struct'. Also the documentation for hlist_for_each_entry_safe() describes @n as "another" hlist_node, but in reality it is the only one. Signed-off-by: NeilBrown <[email protected]> Reviewed-by: Mukesh Ojha <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent fb33c65 commit c84716c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/linux/hashtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static inline void hash_del_rcu(struct hlist_node *node)
145145
* hash entry
146146
* @name: hashtable to iterate
147147
* @bkt: integer to use as bucket loop cursor
148-
* @tmp: a &struct used for temporary storage
148+
* @tmp: a &struct hlist_node used for temporary storage
149149
* @obj: the type * to use as a loop cursor for each entry
150150
* @member: the name of the hlist_node within the struct
151151
*/
@@ -197,7 +197,7 @@ static inline void hash_del_rcu(struct hlist_node *node)
197197
* same bucket safe against removals
198198
* @name: hashtable to iterate
199199
* @obj: the type * to use as a loop cursor for each entry
200-
* @tmp: a &struct used for temporary storage
200+
* @tmp: a &struct hlist_node used for temporary storage
201201
* @member: the name of the hlist_node within the struct
202202
* @key: the key of the objects to iterate over
203203
*/

include/linux/list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ static inline void hlist_move_list(struct hlist_head *old,
989989
/**
990990
* hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry
991991
* @pos: the type * to use as a loop cursor.
992-
* @n: another &struct hlist_node to use as temporary storage
992+
* @n: a &struct hlist_node to use as temporary storage
993993
* @head: the head for your list.
994994
* @member: the name of the hlist_node within the struct.
995995
*/

0 commit comments

Comments
 (0)