All of lore.kernel.org
 help / color / mirror / Atom feed
From: Himadri Pandya <himadri18.07@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: laurent.pinchart@ideasonboard.com, mchehab@kernel.org,
	 Greg KH <gregkh@linuxfoundation.org>,
	outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: media: omap4iss: Use list_entry instead of container_of
Date: Sun, 24 Mar 2019 23:19:54 +0530	[thread overview]
Message-ID: <CAPnhUpYSAaY0J6dRsQf2hMvMfUhvaSXqu+Vgt3aQ7g_mjGX8Hw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1903241812520.2526@hadrien>

[-- Attachment #1: Type: text/plain, Size: 2853 bytes --]

On Sun, Mar 24, 2019 at 10:48 PM Julia Lawall <julia.lawall@lip6.fr> wrote:

>
>
> On Sun, 24 Mar 2019, Himadri Pandya wrote:
>
> > Use list_entry instead of container_of for lists iss_buffer and
> > iss_video.
> >
> > Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> > ---
> >  drivers/staging/media/omap4iss/iss_video.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/media/omap4iss/iss_video.h
> b/drivers/staging/media/omap4iss/iss_video.h
> > index f22489edb562..e8d27b7ac329 100644
> > --- a/drivers/staging/media/omap4iss/iss_video.h
> > +++ b/drivers/staging/media/omap4iss/iss_video.h
> > @@ -118,7 +118,7 @@ struct iss_buffer {
> >       dma_addr_t iss_addr;
> >  };
> >
> > -#define to_iss_buffer(buf)   container_of(buf, struct iss_buffer, vb)
> > +#define to_iss_buffer(buf)   list_entry(buf, struct iss_buffer, vb)
>
> Actually, this macro is no longer used.  Perhaps someone else converted
> the uses to use the proper list operations and forgot to drop the macro
> definition.
>

Then should I send a patch to drop these macros?


>
> >
> >  enum iss_video_dmaqueue_flags {
> >       /* Set if DMA queue becomes empty when
> ISS_PIPELINE_STREAM_CONTINUOUS */
> > @@ -170,7 +170,7 @@ struct iss_video {
> >       const struct iss_video_operations *ops;
> >  };
> >
> > -#define to_iss_video(vdev)   container_of(vdev, struct iss_video, video)
> > +#define to_iss_video(vdev)   list_entry(vdev, struct iss_video, video)
>
> This doesn't involve a list.  Nor does the previous one.  To use
> list_entry, the third argument should be the name of a field that has type
> list_head.
>

Understood. Thank you.

- Himadri


>
> julia
>
> >  struct iss_video_fh {
> >       struct v4l2_fh vfh;
> > --
> > 2.17.1
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/20190324165433.95833-1-himadri18.07%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/alpine.DEB.2.21.1903241812520.2526%40hadrien
> .
> For more options, visit https://groups.google.com/d/optout.
>

[-- Attachment #2: Type: text/html, Size: 4697 bytes --]

  reply	other threads:[~2019-03-24 17:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 16:54 [PATCH] staging: media: omap4iss: Use list_entry instead of container_of Himadri Pandya
2019-03-24 17:18 ` [Outreachy kernel] " Julia Lawall
2019-03-24 17:49   ` Himadri Pandya [this message]
2019-03-24 17:57     ` Julia Lawall
2019-03-25  1:46     ` Laurent Pinchart
2019-03-26 19:43       ` Himadri Pandya
2019-03-30 15:40         ` Himadri Pandya
2019-03-31 10:08         ` Laurent Pinchart
2019-04-01 18:54           ` 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=CAPnhUpYSAaY0J6dRsQf2hMvMfUhvaSXqu+Vgt3aQ7g_mjGX8Hw@mail.gmail.com \
    --to=himadri18.07@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@lip6.fr \
    --cc=laurent.pinchart@ideasonboard.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.