Re: [PATCH] Staging: convert to list_for_each()

From: Alexey Dobriyan
Date: Sat Dec 06 2008 - 15:33:32 EST


On Sat, Dec 06, 2008 at 09:49:05PM +0300, Alexander Beregalov wrote:

No, switch to list_for_each_entry() from the very beginning.

> --- a/drivers/staging/me4000/me4000.c
> +++ b/drivers/staging/me4000/me4000.c
> @@ -542,8 +542,7 @@ static void clear_board_info_list(void)
> struct me4000_ao_context *ao_context;
>
> /* Clear context lists */
> - for (board_p = me4000_board_info_list.next;
> - board_p != &me4000_board_info_list; board_p = board_p->next) {
> + list_for_each(board_p, &me4000_board_info_list) {
> board_info = list_entry(board_p, struct me4000_info, list);
> /* Clear analog output context list */
> while (!list_empty(&board_info->ao_context_list)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/