lkml.org 
[lkml]   [2010]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] videobuf: Initialize lists in videobuf_buffer.
Date
On Wednesday, November 17, 2010 02:38:09 Andrew Chew wrote:
> > > diff --git a/drivers/media/video/videobuf-dma-contig.c
> > b/drivers/media/video/videobuf-dma-contig.c
> > > index c969111..f7e0f86 100644
> > > --- a/drivers/media/video/videobuf-dma-contig.c
> > > +++ b/drivers/media/video/videobuf-dma-contig.c
> > > @@ -193,6 +193,8 @@ static struct videobuf_buffer
> > *__videobuf_alloc_vb(size_t size)
> > > if (vb) {
> > > mem = vb->priv = ((char *)vb) + size;
> > > mem->magic = MAGIC_DC_MEM;
> > > + INIT_LIST_HEAD(&vb->stream);
> > > + INIT_LIST_HEAD(&vb->queue);
> >
> > i think it no need to be init, it just a list-entry.
>
> Okay, if that's really the case, then sh_mobile_ceu_camera.c, pxa_camera.c, mx1_camera.c, mx2_camera.c, and omap1_camera.c needs to be fixed to remove that WARN_ON(!list_empty(&vb->queue)); in their videobuf_prepare() methods, because those WARN_ON's are assuming that vb->queue is properly initialized as a list head.
>
> Which will it be?
>

These list entries need to be inited. It is bad form to have uninitialized
list entries. It is not as if this is a big deal to initialize them properly.

Regards,

Hans

--
Hans Verkuil - video4linux developer - sponsored by Cisco


\
 
 \ /
  Last update: 2010-11-17 08:13    [W:0.320 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site