···128128}129129130130/**131131+ * list_move - delete from one list and add as another's head132132+ * @list: the entry to move133133+ * @head: the head that will precede our entry134134+ */135135+static inline void list_move(struct list_head *list, struct list_head *head)136136+{137137+ __list_del_entry(list);138138+ list_add(list, head);139139+}140140+141141+/**142142+ * list_move_tail - delete from one list and add as another's tail143143+ * @list: the entry to move144144+ * @head: the head that will follow our entry145145+ */146146+static inline void list_move_tail(struct list_head *list,147147+ struct list_head *head)148148+{149149+ __list_del_entry(list);150150+ list_add_tail(list, head);151151+}152152+153153+/**131154 * list_is_head - tests whether @list is the list @head132155 * @list: the entry to test133156 * @head: the head of the list···190167 list_entry((ptr)->next, type, member)191168192169/**170170+ * list_last_entry - get the last element from a list171171+ * @ptr: the list head to take the element from.172172+ * @type: the type of the struct this is embedded in.173173+ * @member: the name of the list_head within the struct.174174+ *175175+ * Note, that list is expected to be not empty.176176+ */177177+#define list_last_entry(ptr, type, member) \178178+ list_entry((ptr)->prev, type, member)179179+180180+/**193181 * list_next_entry - get the next element in list194182 * @pos: the type * to cursor195183 * @member: the name of the list_head within the struct.196184 */197185#define list_next_entry(pos, member) \198186 list_entry((pos)->member.next, typeof(*(pos)), member)187187+188188+/**189189+ * list_prev_entry - get the prev element in list190190+ * @pos: the type * to cursor191191+ * @member: the name of the list_head within the struct.192192+ */193193+#define list_prev_entry(pos, member) \194194+ list_entry((pos)->member.prev, typeof(*(pos)), member)199195200196/**201197 * list_entry_is_head - test if the entry points to the head of the list···235193 for (pos = list_first_entry(head, typeof(*pos), member); \236194 !list_entry_is_head(pos, head, member); \237195 pos = list_next_entry(pos, member))196196+197197+/**198198+ * list_for_each_entry_reverse - iterate backwards over list of given type.199199+ * @pos: the type * to use as a loop cursor.200200+ * @head: the head for your list.201201+ * @member: the name of the list_head within the struct.202202+ */203203+#define list_for_each_entry_reverse(pos, head, member) \204204+ for (pos = list_last_entry(head, typeof(*pos), member); \205205+ !list_entry_is_head(pos, head, member); \206206+ pos = list_prev_entry(pos, member))238207239208/**240209 * list_for_each_entry_safe - iterate over list of given type. Safe against removal of list entry