From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Himadri Pandya <himadri18.07@gmail.com>
Cc: mchehab@kernel.org, gregkh@linuxfoundation.org,
outreachy-kernel@googlegroups.com
Subject: Re: [PATCH 1/2] staging: media: omap4iss: redefine to_iss_buffer()
Date: Tue, 2 Apr 2019 09:58:46 +0300 [thread overview]
Message-ID: <20190402065846.GA4805@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20190401192015.96166-2-himadri18.07@gmail.com>
Hi Himadri,
Thank you for the patch.
On Tue, Apr 02, 2019 at 12:50:14AM +0530, Himadri Pandya wrote:
> Currently macro to_iss_buffer converts vb2_v4l2_buffer into iss_buffer.
> But the application needs the conversion from vb2_buffer to iss_bufffer.
> So they need to convert vb2_buffer into vb2_v4l2_buffer first and then
> vb2_v4l2_buffer into iss_buffer. Redefining to_iss_buffer to convert
> from vb2_buffer into iss_buffer directly helps the situation.
>
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
> drivers/staging/media/omap4iss/iss_video.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/omap4iss/iss_video.h b/drivers/staging/media/omap4iss/iss_video.h
> index f22489edb562..3722ac8ba2fa 100644
> --- a/drivers/staging/media/omap4iss/iss_video.h
> +++ b/drivers/staging/media/omap4iss/iss_video.h
> @@ -118,7 +118,12 @@ struct iss_buffer {
> dma_addr_t iss_addr;
> };
>
> -#define to_iss_buffer(buf) container_of(buf, struct iss_buffer, vb)
> +static inline struct iss_buffer *to_iss_buffer(struct vb2_buffer *vb)
> +{
> + struct vb2_v4l2_buffer *vbuf = container_of(vb, struct vb2_v4l2_buffer, vb2_buf);
> +
> + return container_of(vbuf, struct iss_buffer, vb);
In addition to Greg's comment about merging the two patches in one, you
can also merge the above two lines with
container_of(vb, iss_buffer, vb.vb2_buf)
> +}
>
> enum iss_video_dmaqueue_flags {
> /* Set if DMA queue becomes empty when ISS_PIPELINE_STREAM_CONTINUOUS */
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2019-04-02 6:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 19:20 [PATCH 0/2] staging: media: omap4iss: redefine and use to_iss_buffer Himadri Pandya
2019-04-01 19:20 ` [PATCH 1/2] staging: media: omap4iss: redefine to_iss_buffer() Himadri Pandya
2019-04-02 6:58 ` Laurent Pinchart [this message]
2019-04-02 8:49 ` Himadri Pandya
2019-04-01 19:20 ` [PATCH 2/2] staging: media: omap4iss: use to_iss_buffer instead of container_of Himadri Pandya
2019-04-02 5:53 ` [PATCH 0/2] staging: media: omap4iss: redefine and use to_iss_buffer Greg KH
2019-04-02 8:41 ` Himadri Pandya
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=20190402065846.GA4805@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=gregkh@linuxfoundation.org \
--cc=himadri18.07@gmail.com \
--cc=mchehab@kernel.org \
--cc=outreachy-kernel@googlegroups.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.