Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706382 > unrolled thread

[PATCH 6/6] [media] uvcvideo: constify video_subdev structures

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2017-08-08 13:30 +0200
Last post2017-08-08 15:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 6/6] [media] uvcvideo: constify video_subdev structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-08 13:30 +0200
    Re: [PATCH 6/6] [media] uvcvideo: constify video_subdev structures Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2017-08-08 14:50 +0200
      Re: [PATCH 6/6] [media] uvcvideo: constify video_subdev structures Julia Lawall <julia.lawall@lip6.fr> - 2017-08-08 15:00 +0200

#1706382 — [PATCH 6/6] [media] uvcvideo: constify video_subdev structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-08 13:30 +0200
Subject[PATCH 6/6] [media] uvcvideo: constify video_subdev structures
Message-ID<ucaRZ-7FO-39@gated-at.bofh.it>
uvc_subdev_ops is only passed as the second argument of
v4l2_subdev_init, which is const, so uvc_subdev_ops can be
const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/media/usb/uvc/uvc_entity.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_entity.c b/drivers/media/usb/uvc/uvc_entity.c
index ac386bb..554063c 100644
--- a/drivers/media/usb/uvc/uvc_entity.c
+++ b/drivers/media/usb/uvc/uvc_entity.c
@@ -61,7 +61,7 @@ static int uvc_mc_create_links(struct uvc_video_chain *chain,
 	return 0;
 }
 
-static struct v4l2_subdev_ops uvc_subdev_ops = {
+static const struct v4l2_subdev_ops uvc_subdev_ops = {
 };
 
 void uvc_mc_cleanup_entity(struct uvc_entity *entity)

[toc] | [next] | [standalone]


#1706498

FromLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Date2017-08-08 14:50 +0200
Message-ID<ucc7o-8sm-1@gated-at.bofh.it>
In reply to#1706382
Hi Julia,

Thank you for the patch.

On Tuesday 08 Aug 2017 12:58:32 Julia Lawall wrote:
> uvc_subdev_ops is only passed as the second argument of
> v4l2_subdev_init, which is const, so uvc_subdev_ops can be
> const as well.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree (with the first word of the commit message after the 
prefix capitalized to match the rest of the driver's commit messages, let me 
know if that's a problem :-)).
> 
> ---
>  drivers/media/usb/uvc/uvc_entity.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_entity.c
> b/drivers/media/usb/uvc/uvc_entity.c index ac386bb..554063c 100644
> --- a/drivers/media/usb/uvc/uvc_entity.c
> +++ b/drivers/media/usb/uvc/uvc_entity.c
> @@ -61,7 +61,7 @@ static int uvc_mc_create_links(struct uvc_video_chain
> *chain, return 0;
>  }
> 
> -static struct v4l2_subdev_ops uvc_subdev_ops = {
> +static const struct v4l2_subdev_ops uvc_subdev_ops = {
>  };
> 
>  void uvc_mc_cleanup_entity(struct uvc_entity *entity)

-- 
Regards,

Laurent Pinchart

[toc] | [prev] | [next] | [standalone]


#1706516

FromJulia Lawall <julia.lawall@lip6.fr>
Date2017-08-08 15:00 +0200
Message-ID<ucch5-8wk-29@gated-at.bofh.it>
In reply to#1706498

On Tue, 8 Aug 2017, Laurent Pinchart wrote:

> Hi Julia,
>
> Thank you for the patch.
>
> On Tuesday 08 Aug 2017 12:58:32 Julia Lawall wrote:
> > uvc_subdev_ops is only passed as the second argument of
> > v4l2_subdev_init, which is const, so uvc_subdev_ops can be
> > const as well.
> >
> > Done with the help of Coccinelle.
> >
> > Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> and applied to my tree (with the first word of the commit message after the
> prefix capitalized to match the rest of the driver's commit messages, let me
> know if that's a problem :-)).

No, of course not.  I will try to watch out for that in the future.

julia

> >
> > ---
> >  drivers/media/usb/uvc/uvc_entity.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/uvc/uvc_entity.c
> > b/drivers/media/usb/uvc/uvc_entity.c index ac386bb..554063c 100644
> > --- a/drivers/media/usb/uvc/uvc_entity.c
> > +++ b/drivers/media/usb/uvc/uvc_entity.c
> > @@ -61,7 +61,7 @@ static int uvc_mc_create_links(struct uvc_video_chain
> > *chain, return 0;
> >  }
> >
> > -static struct v4l2_subdev_ops uvc_subdev_ops = {
> > +static const struct v4l2_subdev_ops uvc_subdev_ops = {
> >  };
> >
> >  void uvc_mc_cleanup_entity(struct uvc_entity *entity)
>
> --
> Regards,
>
> Laurent Pinchart
>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web