提交 310517b8 编写于 作者: B Bernard Xiong

[Kernel] Code cleanup

上级 e0bc6b86
...@@ -128,21 +128,21 @@ rt_inline unsigned int rt_list_len(const rt_list_t *l) ...@@ -128,21 +128,21 @@ rt_inline unsigned int rt_list_len(const rt_list_t *l)
/** /**
* rt_list_for_each - iterate over a list * rt_list_for_each - iterate over a list
* @pos: the rt_list_t * to use as a loop cursor. * @pos: the rt_list_t * to use as a loop cursor.
* @head: the head for your list. * @head: the head for your list.
*/ */
#define rt_list_for_each(pos, head) \ #define rt_list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next) for (pos = (head)->next; pos != (head); pos = pos->next)
/** /**
* rt_list_for_each_safe - iterate over a list safe against removal of list entry * rt_list_for_each_safe - iterate over a list safe against removal of list entry
* @pos: the rt_list_t * to use as a loop cursor. * @pos: the rt_list_t * to use as a loop cursor.
* @n: another rt_list_t * to use as temporary storage * @n: another rt_list_t * to use as temporary storage
* @head: the head for your list. * @head: the head for your list.
*/ */
#define rt_list_for_each_safe(pos, n, head) \ #define rt_list_for_each_safe(pos, n, head) \
for (pos = (head)->next, n = pos->next; pos != (head); \ for (pos = (head)->next, n = pos->next; pos != (head); \
pos = n, n = pos->next) pos = n, n = pos->next)
/** /**
* rt_list_for_each_entry - iterate over list of given type * rt_list_for_each_entry - iterate over list of given type
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册