From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Ezequiel Garcia <elezegarcia@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>, linux-media@vger.kernel.org
Subject: Re: [PATCH 04/10] mem2mem_testdev: Remove unneeded struct vb2_queue clear on queue_init()
Date: Thu, 23 Aug 2012 15:49:06 +0200 [thread overview]
Message-ID: <503634D2.9000301@samsung.com> (raw)
In-Reply-To: <1345727311-27478-4-git-send-email-elezegarcia@gmail.com>
Hi Ezequiel,
On 08/23/2012 03:08 PM, Ezequiel Garcia wrote:
> queue_init() is always called by v4l2_m2m_ctx_init(), which allocates
> a context struct v4l2_m2m_ctx with kzalloc.
> Therefore, there is no need to clear vb2_queue src/dst structs.
>
> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Looks good to me. Let me pick this and s5p-jpeg, s5p-g2d patches for v3.7.
It might be good to add some kerneldoc documentation for v4l2_m2m_ctx_init()
function in include/media/v4l2-mem2mem.h, so it is clear what are exact
semantics for the queue_init callback.
Regards,
Sylwester
> ---
> drivers/media/platform/mem2mem_testdev.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c
> index 51b6dd4..9a8b14f 100644
> --- a/drivers/media/platform/mem2mem_testdev.c
> +++ b/drivers/media/platform/mem2mem_testdev.c
> @@ -838,7 +838,6 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *ds
> struct m2mtest_ctx *ctx = priv;
> int ret;
>
> - memset(src_vq, 0, sizeof(*src_vq));
> src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
> src_vq->io_modes = VB2_MMAP;
> src_vq->drv_priv = ctx;
> @@ -850,7 +849,6 @@ static int queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *ds
> if (ret)
> return ret;
>
> - memset(dst_vq, 0, sizeof(*dst_vq));
> dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> dst_vq->io_modes = VB2_MMAP;
> dst_vq->drv_priv = ctx;
next prev parent reply other threads:[~2012-08-23 13:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 13:08 [PATCH 01/10] stk1160: Remove unneeded struct vb2_queue clearing Ezequiel Garcia
2012-08-23 13:08 ` [PATCH 02/10] pwc: " Ezequiel Garcia
2012-09-09 21:57 ` Hans de Goede
2012-08-23 13:08 ` [PATCH 03/10] vivi: " Ezequiel Garcia
2012-08-23 13:08 ` [PATCH 04/10] mem2mem_testdev: Remove unneeded struct vb2_queue clear on queue_init() Ezequiel Garcia
2012-08-23 13:49 ` Sylwester Nawrocki [this message]
2012-08-23 14:04 ` Sylwester Nawrocki
2012-08-23 13:08 ` [PATCH 05/10] coda: " Ezequiel Garcia
2012-08-24 6:21 ` javier Martin
2012-08-23 13:08 ` [PATCH 06/10] mem2mem-deinterlace: " Ezequiel Garcia
2012-08-23 13:08 ` [PATCH 07/10] mem2mem-emmaprp: " Ezequiel Garcia
2012-08-24 6:22 ` javier Martin
2012-08-23 13:08 ` [PATCH 08/10] s5p-fimc: " Ezequiel Garcia
2012-08-23 13:08 ` [PATCH 09/10] s5p-jpeg: " Ezequiel Garcia
2012-08-23 13:08 ` [PATCH 10/10] s5p-g2d: " Ezequiel Garcia
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=503634D2.9000301@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=elezegarcia@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).