From: "Figo.zhang" <zhangtianfei@leadcoretech.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Pawel Osciak <pawel@osciak.com>, Andrew Chew <AChew@nvidia.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: Allocating videobuf_buffer, but lists not being initialized
Date: Tue, 16 Nov 2010 15:58:44 +0800 [thread overview]
Message-ID: <4CE239B4.7000503@leadcoretech.com> (raw)
In-Reply-To: <201011160840.24134.hverkuil@xs4all.nl>
于 11/16/2010 03:40 PM, Hans Verkuil 写道:
> On Tuesday, November 16, 2010 06:29:53 Pawel Osciak wrote:
>> On Mon, Nov 15, 2010 at 17:10, Andrew Chew<AChew@nvidia.com> wrote:
>>> I'm looking at drivers/media/video/videobuf-dma-contig.c's __videobuf_alloc() routine. We call kzalloc() to allocate the videobuf_buffer. However, I don't see where the two lists (vb->stream and vb->queue) that are a part of struct videobuf_buffer get initialized (with, say, INIT_LIST_HEAD).
>>>
>>
>> Those are not lists, but list entries. Those members of
>> videobuf_buffer struct are used to put the buffer on one of the
>> following lists: stream is a list entry for stream list in
>> videobuf_queue, queue is used as list entry for driver's buffer queue.
>
> So? They still should be initialized properly. It's bad form to leave
> invalid pointers there.
it just a list->entry, it has initialized by kzalloc at
__videobuf_alloc_vb(),
>
> Regards,
>
> Hans
>
next prev parent reply other threads:[~2010-11-16 8:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <643E69AA4436674C8F39DCC2C05F763816BB828A36@HQMAIL03.nvidia.com>
2010-11-16 1:10 ` Allocating videobuf_buffer, but lists not being initialized Andrew Chew
2010-11-16 5:29 ` Pawel Osciak
2010-11-16 7:40 ` Hans Verkuil
2010-11-16 7:58 ` Figo.zhang [this message]
2010-11-16 7:37 ` Hans Verkuil
2010-11-16 7:48 ` Hans Verkuil
2010-11-16 8:01 ` Figo.zhang
2010-11-16 10:10 ` Marek Szyprowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CE239B4.7000503@leadcoretech.com \
--to=zhangtianfei@leadcoretech.com \
--cc=AChew@nvidia.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=pawel@osciak.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.