Re: [PATCH] [media] pci: constify vb2_ops structures
On Fri, 9 Sep 2016, Andrey Utkin wrote: > On Fri, Sep 09, 2016 at 10:31:30PM +0800, Julia Lawall wrote: > > Will this soon reach linux-next? > > No idea. Indeed it's simpler if you leave your patch as is, and then > later we patch this new driver separately. OK, thanks. julia -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] pci: constify vb2_ops structures
On Fri, Sep 09, 2016 at 10:31:30PM +0800, Julia Lawall wrote: > Will this soon reach linux-next? No idea. Indeed it's simpler if you leave your patch as is, and then later we patch this new driver separately. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] pci: constify vb2_ops structures
On Fri, 9 Sep 2016, Andrey Utkin wrote: > On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote: > > Check for vb2_ops structures that are only stored in the ops field of a > > vb2_queue structure. That field is declared const, so vb2_ops structures > > that have this property can be declared as const also. > > > Signed-off-by: Julia Lawall> > > > --- > > drivers/media/pci/cx23885/cx23885-417.c|2 +- > > drivers/media/pci/cx23885/cx23885-dvb.c|2 +- > > drivers/media/pci/cx23885/cx23885-video.c |2 +- > > drivers/media/pci/cx25821/cx25821-video.c |2 +- > > drivers/media/pci/cx88/cx88-blackbird.c|2 +- > > drivers/media/pci/cx88/cx88-dvb.c |2 +- > > drivers/media/pci/cx88/cx88-video.c|2 +- > > drivers/media/pci/netup_unidvb/netup_unidvb_core.c |2 +- > > drivers/media/pci/saa7134/saa7134-empress.c|2 +- > > drivers/media/pci/saa7134/saa7134-video.c |2 +- > > drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |2 +- > > drivers/media/pci/tw68/tw68-video.c|2 +- > > drivers/media/pci/tw686x/tw686x-video.c|2 +- > > 13 files changed, 13 insertions(+), 13 deletions(-) > > Applies and compiles cleanly on media tree. > But please regenerate this patch on git://linuxtv.org/media_tree.git - > it has a new driver by me, drivers/media/pci/tw5864 , which is affected. Will this soon reach linux-next? julia -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] pci: constify vb2_ops structures
On 9 September 2016 12:34:57 EEST, Julia Lawallwrote: >Do you want the whole patch again, or would a patch on the new driver >by itself be sufficient? The changes in the different files are all >independent. I guess maintainers would want a single patch for everything in this case. But don't take my word, ask/look what they say. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] pci: constify vb2_ops structures
Le 09.09.2016 17:17, Andrey Utkin a écrit : On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote: Check for vb2_ops structures that are only stored in the ops field of a vb2_queue structure. That field is declared const, so vb2_ops structures that have this property can be declared as const also. Signed-off-by: Julia Lawall--- drivers/media/pci/cx23885/cx23885-417.c|2 +- drivers/media/pci/cx23885/cx23885-dvb.c|2 +- drivers/media/pci/cx23885/cx23885-video.c |2 +- drivers/media/pci/cx25821/cx25821-video.c |2 +- drivers/media/pci/cx88/cx88-blackbird.c|2 +- drivers/media/pci/cx88/cx88-dvb.c |2 +- drivers/media/pci/cx88/cx88-video.c|2 +- drivers/media/pci/netup_unidvb/netup_unidvb_core.c |2 +- drivers/media/pci/saa7134/saa7134-empress.c|2 +- drivers/media/pci/saa7134/saa7134-video.c |2 +- drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |2 +- drivers/media/pci/tw68/tw68-video.c|2 +- drivers/media/pci/tw686x/tw686x-video.c|2 +- 13 files changed, 13 insertions(+), 13 deletions(-) Applies and compiles cleanly on media tree. But please regenerate this patch on git://linuxtv.org/media_tree.git - it has a new driver by me, drivers/media/pci/tw5864 , which is affected. Do you want the whole patch again, or would a patch on the new driver by itself be sufficient? The changes in the different files are all independent. julia Otherwise Acked-by: Andrey Utkin (however this time I'm writing from another email.) -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [media] pci: constify vb2_ops structures
On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote: > Check for vb2_ops structures that are only stored in the ops field of a > vb2_queue structure. That field is declared const, so vb2_ops structures > that have this property can be declared as const also. > Signed-off-by: Julia Lawall> > --- > drivers/media/pci/cx23885/cx23885-417.c|2 +- > drivers/media/pci/cx23885/cx23885-dvb.c|2 +- > drivers/media/pci/cx23885/cx23885-video.c |2 +- > drivers/media/pci/cx25821/cx25821-video.c |2 +- > drivers/media/pci/cx88/cx88-blackbird.c|2 +- > drivers/media/pci/cx88/cx88-dvb.c |2 +- > drivers/media/pci/cx88/cx88-video.c|2 +- > drivers/media/pci/netup_unidvb/netup_unidvb_core.c |2 +- > drivers/media/pci/saa7134/saa7134-empress.c|2 +- > drivers/media/pci/saa7134/saa7134-video.c |2 +- > drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |2 +- > drivers/media/pci/tw68/tw68-video.c|2 +- > drivers/media/pci/tw686x/tw686x-video.c|2 +- > 13 files changed, 13 insertions(+), 13 deletions(-) Applies and compiles cleanly on media tree. But please regenerate this patch on git://linuxtv.org/media_tree.git - it has a new driver by me, drivers/media/pci/tw5864 , which is affected. Otherwise Acked-by: Andrey Utkin (however this time I'm writing from another email.) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] pci: constify vb2_ops structures
Check for vb2_ops structures that are only stored in the ops field of a vb2_queue structure. That field is declared const, so vb2_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @r disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p = { ... }; @ok@ identifier r.i; struct vb2_queue e; position p; @@ e.ops = @p; @bad@ position p != {r.p,ok.p}; identifier r.i; struct vb2_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct vb2_ops i = { ... }; // Signed-off-by: Julia Lawall--- drivers/media/pci/cx23885/cx23885-417.c|2 +- drivers/media/pci/cx23885/cx23885-dvb.c|2 +- drivers/media/pci/cx23885/cx23885-video.c |2 +- drivers/media/pci/cx25821/cx25821-video.c |2 +- drivers/media/pci/cx88/cx88-blackbird.c|2 +- drivers/media/pci/cx88/cx88-dvb.c |2 +- drivers/media/pci/cx88/cx88-video.c|2 +- drivers/media/pci/netup_unidvb/netup_unidvb_core.c |2 +- drivers/media/pci/saa7134/saa7134-empress.c|2 +- drivers/media/pci/saa7134/saa7134-video.c |2 +- drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |2 +- drivers/media/pci/tw68/tw68-video.c|2 +- drivers/media/pci/tw686x/tw686x-video.c|2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c index 3991643..25a2137 100644 --- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c @@ -759,7 +759,7 @@ static void solo_enc_buf_finish(struct vb2_buffer *vb) } } -static struct vb2_ops solo_enc_video_qops = { +static const struct vb2_ops solo_enc_video_qops = { .queue_setup= solo_enc_queue_setup, .buf_queue = solo_enc_buf_queue, .buf_finish = solo_enc_buf_finish, diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c index ac547cb..b078ac2 100644 --- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c +++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c @@ -353,7 +353,7 @@ static void netup_unidvb_stop_streaming(struct vb2_queue *q) netup_unidvb_queue_cleanup(dma); } -static struct vb2_ops dvb_qops = { +static const struct vb2_ops dvb_qops = { .queue_setup= netup_unidvb_queue_setup, .buf_prepare= netup_unidvb_buf_prepare, .buf_queue = netup_unidvb_buf_queue, diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index 04fe9af..b532e49 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c @@ -756,7 +756,7 @@ static void stop_streaming(struct vb2_queue *q) spin_unlock_irqrestore(>slock, flags); } -static struct vb2_ops blackbird_qops = { +static const struct vb2_ops blackbird_qops = { .queue_setup= queue_setup, .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c index 5bb63e7..ac2392d 100644 --- a/drivers/media/pci/cx88/cx88-dvb.c +++ b/drivers/media/pci/cx88/cx88-dvb.c @@ -156,7 +156,7 @@ static void stop_streaming(struct vb2_queue *q) spin_unlock_irqrestore(>slock, flags); } -static struct vb2_ops dvb_qops = { +static const struct vb2_ops dvb_qops = { .queue_setup= queue_setup, .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index 5dc1e3f..d83eb3b 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -567,7 +567,7 @@ static void stop_streaming(struct vb2_queue *q) spin_unlock_irqrestore(>slock, flags); } -static struct vb2_ops cx8800_video_qops = { +static const struct vb2_ops cx8800_video_qops = { .queue_setup= queue_setup, .buf_prepare = buffer_prepare, .buf_finish = buffer_finish, diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c index cdb16de..7339b9a 100644 --- a/drivers/media/pci/tw686x/tw686x-video.c +++ b/drivers/media/pci/tw686x/tw686x-video.c @@ -577,7 +577,7 @@ static int tw686x_buf_prepare(struct vb2_buffer *vb) return 0; } -static struct vb2_ops tw686x_video_qops = { +static const struct vb2_ops tw686x_video_qops = { .queue_setup= tw686x_queue_setup, .buf_queue = tw686x_buf_queue, .buf_prepare= tw686x_buf_prepare, diff --git a/drivers/media/pci/tw68/tw68-video.c