Re: [PATCH 1/3] ring-buffer: make the buffer a true circular linklist

From: Steven Rostedt
Date: Wed Jun 10 2009 - 23:35:30 EST



On Thu, 11 Jun 2009, Lai Jiangshan wrote:
>
> I'm not sure whether these 4 lines:
> bpage = list_entry(pages.next, struct buffer_page, list);
> list_del_init(&bpage->list);
> cpu_buffer->pages = &bpage->list;
>
> list_splice(&pages, cpu_buffer->pages);

> equal to these 2 lines:
> cpu_buffer->pages = pages.next;
> list_del(&pages);
>
> If there are equivalent, I think the second one
> are simpler. It may be not a really necessarily cleanup.
>
> What I asked is: if there are equivalent, could you use these two line:
> cpu_buffer->pages = pages.next;
> list_del(&pages);

OK, now I understand.

Hmm, that may be so. I'll have to look deeper at that.

Thanks,

-- Steve

--
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/