2017-08-26 10:20:29

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 00/10] [media] platform: make video_device const

Make make video_device const.

Bhumika Goyal (10):
[media] cx88: make video_device const
[media] dt3155: make video_device const
[media]: marvell-ccic: make video_device const
[media] mx2-emmaprp: make video_device const
[media]: s5p-g2d: make video_device const
[media]: ti-vpe: make video_device const
[media] via-camera: make video_device const
[media]: fsl-viu: make video_device const
[media] m2m-deinterlace: make video_device const
[media] vim2m: make video_device const

drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
drivers/media/pci/dt3155/dt3155.c | 2 +-
drivers/media/platform/fsl-viu.c | 2 +-
drivers/media/platform/m2m-deinterlace.c | 2 +-
drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
drivers/media/platform/mx2_emmaprp.c | 2 +-
drivers/media/platform/s5p-g2d/g2d.c | 2 +-
drivers/media/platform/ti-vpe/cal.c | 2 +-
drivers/media/platform/ti-vpe/vpe.c | 2 +-
drivers/media/platform/via-camera.c | 2 +-
drivers/media/platform/vim2m.c | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)

--
1.9.1


2017-08-26 10:20:38

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 01/10] [media] cx88: make video_device const

Make this const as it is only passed to the const argument of the
function cx88_vdev_init.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c
index aa49c95..e3101f0 100644
--- a/drivers/media/pci/cx88/cx88-blackbird.c
+++ b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -1075,7 +1075,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id id)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};

-static struct video_device cx8802_mpeg_template = {
+static const struct video_device cx8802_mpeg_template = {
.name = "cx8802",
.fops = &mpeg_fops,
.ioctl_ops = &mpeg_ioctl_ops,
--
1.9.1

2017-08-26 10:20:47

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 02/10] [media] dt3155: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/pci/dt3155/dt3155.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/dt3155/dt3155.c b/drivers/media/pci/dt3155/dt3155.c
index 6a21969..1775c36 100644
--- a/drivers/media/pci/dt3155/dt3155.c
+++ b/drivers/media/pci/dt3155/dt3155.c
@@ -499,7 +499,7 @@ static int dt3155_init_board(struct dt3155_priv *pd)
return 0;
}

-static struct video_device dt3155_vdev = {
+static const struct video_device dt3155_vdev = {
.name = DT3155_NAME,
.fops = &dt3155_fops,
.ioctl_ops = &dt3155_ioctl_ops,
--
1.9.1

2017-08-26 10:20:56

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 03/10] [media]: marvell-ccic: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index 8cac2f2..b07a251 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1639,7 +1639,7 @@ static int mcam_v4l_release(struct file *filp)
* This template device holds all of those v4l2 methods; we
* clone it for specific real devices.
*/
-static struct video_device mcam_v4l_template = {
+static const struct video_device mcam_v4l_template = {
.name = "mcam",
.fops = &mcam_v4l_fops,
.ioctl_ops = &mcam_v4l_ioctl_ops,
--
1.9.1

2017-08-26 10:21:05

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 04/10] [media] mx2-emmaprp: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/mx2_emmaprp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c
index 7fd209e..3493d40 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -873,7 +873,7 @@ static int emmaprp_mmap(struct file *file, struct vm_area_struct *vma)
.mmap = emmaprp_mmap,
};

-static struct video_device emmaprp_videodev = {
+static const struct video_device emmaprp_videodev = {
.name = MEM2MEM_NAME,
.fops = &emmaprp_fops,
.ioctl_ops = &emmaprp_ioctl_ops,
--
1.9.1

2017-08-26 10:21:13

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 05/10] [media]: s5p-g2d: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/s5p-g2d/g2d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index bd655b5..66aa8cf 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -602,7 +602,7 @@ static irqreturn_t g2d_isr(int irq, void *prv)
.vidioc_cropcap = vidioc_cropcap,
};

-static struct video_device g2d_videodev = {
+static const struct video_device g2d_videodev = {
.name = G2D_NAME,
.fops = &g2d_fops,
.ioctl_ops = &g2d_ioctl_ops,
--
1.9.1

2017-08-26 10:21:20

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 06/10] [media]: ti-vpe: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/ti-vpe/cal.c | 2 +-
drivers/media/platform/ti-vpe/vpe.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index 0c7ddf8..42e383a 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -1420,7 +1420,7 @@ static void cal_stop_streaming(struct vb2_queue *vq)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};

-static struct video_device cal_videodev = {
+static const struct video_device cal_videodev = {
.name = CAL_MODULE_NAME,
.fops = &cal_fops,
.ioctl_ops = &cal_ioctl_ops,
diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c
index 2873c22..45bd105 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/platform/ti-vpe/vpe.c
@@ -2421,7 +2421,7 @@ static int vpe_release(struct file *file)
.mmap = v4l2_m2m_fop_mmap,
};

-static struct video_device vpe_videodev = {
+static const struct video_device vpe_videodev = {
.name = VPE_MODULE_NAME,
.fops = &vpe_fops,
.ioctl_ops = &vpe_ioctl_ops,
--
1.9.1

2017-08-26 10:21:30

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 07/10] [media] via-camera: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/via-camera.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
index e16f70a..805d4a8 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -1259,7 +1259,7 @@ static int viacam_resume(void *priv)
* Setup stuff.
*/

-static struct video_device viacam_v4l_template = {
+static const struct video_device viacam_v4l_template = {
.name = "via-camera",
.minor = -1,
.tvnorms = V4L2_STD_NTSC_M,
--
1.9.1

2017-08-26 10:21:38

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 08/10] [media]: fsl-viu: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/fsl-viu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index f7b88e5..b3b91cb 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -1380,7 +1380,7 @@ static int viu_mmap(struct file *file, struct vm_area_struct *vma)
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};

-static struct video_device viu_template = {
+static const struct video_device viu_template = {
.name = "FSL viu",
.fops = &viu_fops,
.minor = -1,
--
1.9.1

2017-08-26 10:21:46

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 09/10] [media] m2m-deinterlace: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/m2m-deinterlace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
index 98f6db2..c8a1249 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -979,7 +979,7 @@ static int deinterlace_mmap(struct file *file, struct vm_area_struct *vma)
.mmap = deinterlace_mmap,
};

-static struct video_device deinterlace_videodev = {
+static const struct video_device deinterlace_videodev = {
.name = MEM2MEM_NAME,
.fops = &deinterlace_fops,
.ioctl_ops = &deinterlace_ioctl_ops,
--
1.9.1

2017-08-26 10:21:54

by Bhumika Goyal

[permalink] [raw]
Subject: [PATCH 10/10] [media] vim2m: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <[email protected]>
---
drivers/media/platform/vim2m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index afbaa35..b01fba0 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -974,7 +974,7 @@ static int vim2m_release(struct file *file)
.mmap = v4l2_m2m_fop_mmap,
};

-static struct video_device vim2m_videodev = {
+static const struct video_device vim2m_videodev = {
.name = MEM2MEM_NAME,
.vfl_dir = VFL_DIR_M2M,
.fops = &vim2m_fops,
--
1.9.1

2017-08-26 11:59:54

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 00/10] [media] platform: make video_device const

Em Sat, 26 Aug 2017 15:50:02 +0530
Bhumika Goyal <[email protected]> escreveu:

> Make make video_device const.
>
> Bhumika Goyal (10):
> [media] cx88: make video_device const
> [media] dt3155: make video_device const
> [media]: marvell-ccic: make video_device const
> [media] mx2-emmaprp: make video_device const
> [media]: s5p-g2d: make video_device const
> [media]: ti-vpe: make video_device const
> [media] via-camera: make video_device const
> [media]: fsl-viu: make video_device const
> [media] m2m-deinterlace: make video_device const
> [media] vim2m: make video_device const
>
> drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
> drivers/media/pci/dt3155/dt3155.c | 2 +-
> drivers/media/platform/fsl-viu.c | 2 +-
> drivers/media/platform/m2m-deinterlace.c | 2 +-
> drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
> drivers/media/platform/mx2_emmaprp.c | 2 +-
> drivers/media/platform/s5p-g2d/g2d.c | 2 +-
> drivers/media/platform/ti-vpe/cal.c | 2 +-
> drivers/media/platform/ti-vpe/vpe.c | 2 +-
> drivers/media/platform/via-camera.c | 2 +-
> drivers/media/platform/vim2m.c | 2 +-

Please, don't do one such cleanup patch per file. Instead, group
it per subdirectory, e. g. on e patch for:
drivers/media/platform/

and another one for:
drivers/media/pci/

That makes a lot easier to review and apply.

Thanks,
Mauro

2017-08-26 12:12:37

by Bhumika Goyal

[permalink] [raw]
Subject: Re: [PATCH 00/10] [media] platform: make video_device const

On Sat, Aug 26, 2017 at 5:29 PM, Mauro Carvalho Chehab
<[email protected]> wrote:
> Em Sat, 26 Aug 2017 15:50:02 +0530
> Bhumika Goyal <[email protected]> escreveu:
>
>> Make make video_device const.
>>
>> Bhumika Goyal (10):
>> [media] cx88: make video_device const
>> [media] dt3155: make video_device const
>> [media]: marvell-ccic: make video_device const
>> [media] mx2-emmaprp: make video_device const
>> [media]: s5p-g2d: make video_device const
>> [media]: ti-vpe: make video_device const
>> [media] via-camera: make video_device const
>> [media]: fsl-viu: make video_device const
>> [media] m2m-deinterlace: make video_device const
>> [media] vim2m: make video_device const
>>
>> drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
>> drivers/media/pci/dt3155/dt3155.c | 2 +-
>> drivers/media/platform/fsl-viu.c | 2 +-
>> drivers/media/platform/m2m-deinterlace.c | 2 +-
>> drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
>> drivers/media/platform/mx2_emmaprp.c | 2 +-
>> drivers/media/platform/s5p-g2d/g2d.c | 2 +-
>> drivers/media/platform/ti-vpe/cal.c | 2 +-
>> drivers/media/platform/ti-vpe/vpe.c | 2 +-
>> drivers/media/platform/via-camera.c | 2 +-
>> drivers/media/platform/vim2m.c | 2 +-
>
> Please, don't do one such cleanup patch per file. Instead, group
> it per subdirectory, e. g. on e patch for:
> drivers/media/platform/
>
> and another one for:
> drivers/media/pci/
>
> That makes a lot easier to review and apply.
>

Okay, I will keep this in mind. Should I send a v2 for both the series?

Thanks,
Bhumika

> Thanks,
> Mauro

2017-08-26 12:29:12

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 00/10] [media] platform: make video_device const

Em Sat, 26 Aug 2017 17:42:34 +0530
Bhumika Goyal <[email protected]> escreveu:

> On Sat, Aug 26, 2017 at 5:29 PM, Mauro Carvalho Chehab
> <[email protected]> wrote:
> > Em Sat, 26 Aug 2017 15:50:02 +0530
> > Bhumika Goyal <[email protected]> escreveu:
> >
> >> Make make video_device const.
> >>
> >> Bhumika Goyal (10):
> >> [media] cx88: make video_device const
> >> [media] dt3155: make video_device const
> >> [media]: marvell-ccic: make video_device const
> >> [media] mx2-emmaprp: make video_device const
> >> [media]: s5p-g2d: make video_device const
> >> [media]: ti-vpe: make video_device const
> >> [media] via-camera: make video_device const
> >> [media]: fsl-viu: make video_device const
> >> [media] m2m-deinterlace: make video_device const
> >> [media] vim2m: make video_device const
> >>
> >> drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
> >> drivers/media/pci/dt3155/dt3155.c | 2 +-
> >> drivers/media/platform/fsl-viu.c | 2 +-
> >> drivers/media/platform/m2m-deinterlace.c | 2 +-
> >> drivers/media/platform/marvell-ccic/mcam-core.c | 2 +-
> >> drivers/media/platform/mx2_emmaprp.c | 2 +-
> >> drivers/media/platform/s5p-g2d/g2d.c | 2 +-
> >> drivers/media/platform/ti-vpe/cal.c | 2 +-
> >> drivers/media/platform/ti-vpe/vpe.c | 2 +-
> >> drivers/media/platform/via-camera.c | 2 +-
> >> drivers/media/platform/vim2m.c | 2 +-
> >
> > Please, don't do one such cleanup patch per file. Instead, group
> > it per subdirectory, e. g. on e patch for:
> > drivers/media/platform/
> >
> > and another one for:
> > drivers/media/pci/
> >
> > That makes a lot easier to review and apply.
> >
>
> Okay, I will keep this in mind. Should I send a v2 for both the series?

Yes, please.

Thanks,
Mauro