* [RFC PATCH 0/3] Three more patches to fix const issues
@ 2012-10-02 8:57 Hans Verkuil
2012-10-02 8:57 ` [RFC PATCH 1/3] s5p-g2d: fix compiler warning Hans Verkuil
0 siblings, 1 reply; 9+ messages in thread
From: Hans Verkuil @ 2012-10-02 8:57 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Sylwester Nawrocki
Several ioctl ops now use const, but there was some fall-out from that
in drivers. Most drivers already have patches pending fixing such issues,
but I didn't see any for these three.
Regards,
Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* [RFC PATCH 1/3] s5p-g2d: fix compiler warning
2012-10-02 8:57 [RFC PATCH 0/3] Three more patches to fix const issues Hans Verkuil
@ 2012-10-02 8:57 ` Hans Verkuil
2012-10-02 8:57 ` [RFC PATCH 2/3] s5p-fimc: " Hans Verkuil
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Hans Verkuil @ 2012-10-02 8:57 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Sylwester Nawrocki
drivers/media/platform/s5p-g2d/g2d.c:535:2: warning: passing argument 3 of 'vidioc_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
drivers/media/platform/s5p-g2d/g2d.c:510:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
This is fall-out from this commit:
commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
Author: Hans Verkuil <hans.verkuil@cisco.com>
Date: Wed Sep 5 05:10:48 2012 -0300
[media] v4l2: make vidioc_s_crop const
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
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 1e3b9dd..1bfbc32 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -507,7 +507,7 @@ static int vidioc_g_crop(struct file *file, void *prv, struct v4l2_crop *cr)
return 0;
}
-static int vidioc_try_crop(struct file *file, void *prv, struct v4l2_crop *cr)
+static int vidioc_try_crop(struct file *file, void *prv, const struct v4l2_crop *cr)
{
struct g2d_ctx *ctx = prv;
struct g2d_dev *dev = ctx->dev;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [RFC PATCH 2/3] s5p-fimc: fix compiler warning
2012-10-02 8:57 ` [RFC PATCH 1/3] s5p-g2d: fix compiler warning Hans Verkuil
@ 2012-10-02 8:57 ` Hans Verkuil
2012-10-03 10:16 ` Sylwester Nawrocki
2012-10-02 8:57 ` [RFC PATCH 3/3] fsl-viu: " Hans Verkuil
2012-10-03 10:16 ` [RFC PATCH 1/3] s5p-g2d: " Sylwester Nawrocki
2 siblings, 1 reply; 9+ messages in thread
From: Hans Verkuil @ 2012-10-02 8:57 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Sylwester Nawrocki
drivers/media/platform/s5p-fimc/fimc-m2m.c:561:2: warning: passing argument 2 of 'fimc_m2m_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
drivers/media/platform/s5p-fimc/fimc-m2m.c:502:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
This is fall-out from this commit:
commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
Author: Hans Verkuil <hans.verkuil@cisco.com>
Date: Wed Sep 5 05:10:48 2012 -0300
[media] v4l2: make vidioc_s_crop const
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/s5p-fimc/fimc-m2m.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/drivers/media/platform/s5p-fimc/fimc-m2m.c b/drivers/media/platform/s5p-fimc/fimc-m2m.c
index 51fc04c..03def3d 100644
--- a/drivers/media/platform/s5p-fimc/fimc-m2m.c
+++ b/drivers/media/platform/s5p-fimc/fimc-m2m.c
@@ -551,30 +551,31 @@ static int fimc_m2m_try_crop(struct fimc_ctx *ctx, struct v4l2_crop *cr)
return 0;
}
-static int fimc_m2m_s_crop(struct file *file, void *fh, const struct v4l2_crop *cr)
+static int fimc_m2m_s_crop(struct file *file, void *fh, const struct v4l2_crop *crop)
{
struct fimc_ctx *ctx = fh_to_ctx(fh);
struct fimc_dev *fimc = ctx->fimc_dev;
+ struct v4l2_crop cr = *crop;
struct fimc_frame *f;
int ret;
- ret = fimc_m2m_try_crop(ctx, cr);
+ ret = fimc_m2m_try_crop(ctx, &cr);
if (ret)
return ret;
- f = (cr->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) ?
+ f = (cr.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) ?
&ctx->s_frame : &ctx->d_frame;
/* Check to see if scaling ratio is within supported range */
if (fimc_ctx_state_is_set(FIMC_DST_FMT | FIMC_SRC_FMT, ctx)) {
- if (cr->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
- ret = fimc_check_scaler_ratio(ctx, cr->c.width,
- cr->c.height, ctx->d_frame.width,
+ if (cr.type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
+ ret = fimc_check_scaler_ratio(ctx, cr.c.width,
+ cr.c.height, ctx->d_frame.width,
ctx->d_frame.height, ctx->rotation);
} else {
ret = fimc_check_scaler_ratio(ctx, ctx->s_frame.width,
- ctx->s_frame.height, cr->c.width,
- cr->c.height, ctx->rotation);
+ ctx->s_frame.height, cr.c.width,
+ cr.c.height, ctx->rotation);
}
if (ret) {
v4l2_err(&fimc->m2m.vfd, "Out of scaler range\n");
@@ -582,10 +583,10 @@ static int fimc_m2m_s_crop(struct file *file, void *fh, const struct v4l2_crop *
}
}
- f->offs_h = cr->c.left;
- f->offs_v = cr->c.top;
- f->width = cr->c.width;
- f->height = cr->c.height;
+ f->offs_h = cr.c.left;
+ f->offs_v = cr.c.top;
+ f->width = cr.c.width;
+ f->height = cr.c.height;
fimc_ctx_state_set(FIMC_PARAMS, ctx);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [RFC PATCH 3/3] fsl-viu: fix compiler warning.
2012-10-02 8:57 ` [RFC PATCH 1/3] s5p-g2d: fix compiler warning Hans Verkuil
2012-10-02 8:57 ` [RFC PATCH 2/3] s5p-fimc: " Hans Verkuil
@ 2012-10-02 8:57 ` Hans Verkuil
2012-10-02 9:18 ` Anatolij Gustschin
2012-10-03 10:16 ` [RFC PATCH 1/3] s5p-g2d: " Sylwester Nawrocki
2 siblings, 1 reply; 9+ messages in thread
From: Hans Verkuil @ 2012-10-02 8:57 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Sylwester Nawrocki
drivers/media/platform/fsl-viu.c: In function 'vidioc_s_fbuf':
drivers/media/platform/fsl-viu.c:867:32: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
This is fall-out from this commit:
commit e6eb28c2207b9397d0ab56e238865a4ee95b7ef9
Author: Hans Verkuil <hans.verkuil@cisco.com>
Date: Tue Sep 4 10:26:45 2012 -0300
[media] v4l2: make vidioc_s_fbuf const
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
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 897250b..31ac4dc 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -864,7 +864,7 @@ int vidioc_s_fbuf(struct file *file, void *priv, const struct v4l2_framebuffer *
{
struct viu_fh *fh = priv;
struct viu_dev *dev = fh->dev;
- struct v4l2_framebuffer *fb = arg;
+ const struct v4l2_framebuffer *fb = arg;
struct viu_fmt *fmt;
if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RAWIO))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 3/3] fsl-viu: fix compiler warning.
2012-10-02 8:57 ` [RFC PATCH 3/3] fsl-viu: " Hans Verkuil
@ 2012-10-02 9:18 ` Anatolij Gustschin
0 siblings, 0 replies; 9+ messages in thread
From: Anatolij Gustschin @ 2012-10-02 9:18 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, Sylwester Nawrocki
On Tue, 2 Oct 2012 10:57:20 +0200
Hans Verkuil <hans.verkuil@cisco.com> wrote:
> drivers/media/platform/fsl-viu.c: In function 'vidioc_s_fbuf':
> drivers/media/platform/fsl-viu.c:867:32: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
>
> This is fall-out from this commit:
>
> commit e6eb28c2207b9397d0ab56e238865a4ee95b7ef9
> Author: Hans Verkuil <hans.verkuil@cisco.com>
> Date: Tue Sep 4 10:26:45 2012 -0300
>
> [media] v4l2: make vidioc_s_fbuf const
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
> drivers/media/platform/fsl-viu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Anatolij Gustschin <agust@denx.de>
Thanks,
Anatolij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/3] s5p-g2d: fix compiler warning
2012-10-02 8:57 ` [RFC PATCH 1/3] s5p-g2d: fix compiler warning Hans Verkuil
2012-10-02 8:57 ` [RFC PATCH 2/3] s5p-fimc: " Hans Verkuil
2012-10-02 8:57 ` [RFC PATCH 3/3] fsl-viu: " Hans Verkuil
@ 2012-10-03 10:16 ` Sylwester Nawrocki
2012-10-04 6:43 ` Hans Verkuil
2 siblings, 1 reply; 9+ messages in thread
From: Sylwester Nawrocki @ 2012-10-03 10:16 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, Anatolij Gustschin
On 10/02/2012 10:57 AM, Hans Verkuil wrote:
> drivers/media/platform/s5p-g2d/g2d.c:535:2: warning: passing argument 3 of 'vidioc_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
> drivers/media/platform/s5p-g2d/g2d.c:510:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
>
> This is fall-out from this commit:
>
> commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
> Author: Hans Verkuil <hans.verkuil@cisco.com>
> Date: Wed Sep 5 05:10:48 2012 -0300
>
> [media] v4l2: make vidioc_s_crop const
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Aplied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 2/3] s5p-fimc: fix compiler warning
2012-10-02 8:57 ` [RFC PATCH 2/3] s5p-fimc: " Hans Verkuil
@ 2012-10-03 10:16 ` Sylwester Nawrocki
0 siblings, 0 replies; 9+ messages in thread
From: Sylwester Nawrocki @ 2012-10-03 10:16 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, Anatolij Gustschin
On 10/02/2012 10:57 AM, Hans Verkuil wrote:
> drivers/media/platform/s5p-fimc/fimc-m2m.c:561:2: warning: passing argument 2 of 'fimc_m2m_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
> drivers/media/platform/s5p-fimc/fimc-m2m.c:502:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
>
> This is fall-out from this commit:
>
> commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
> Author: Hans Verkuil <hans.verkuil@cisco.com>
> Date: Wed Sep 5 05:10:48 2012 -0300
>
> [media] v4l2: make vidioc_s_crop const
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/3] s5p-g2d: fix compiler warning
2012-10-03 10:16 ` [RFC PATCH 1/3] s5p-g2d: " Sylwester Nawrocki
@ 2012-10-04 6:43 ` Hans Verkuil
2012-10-04 9:26 ` Sylwester Nawrocki
0 siblings, 1 reply; 9+ messages in thread
From: Hans Verkuil @ 2012-10-04 6:43 UTC (permalink / raw)
To: Sylwester Nawrocki; +Cc: Hans Verkuil, linux-media, Anatolij Gustschin
On Wed October 3 2012 12:16:48 Sylwester Nawrocki wrote:
> On 10/02/2012 10:57 AM, Hans Verkuil wrote:
> > drivers/media/platform/s5p-g2d/g2d.c:535:2: warning: passing argument 3 of 'vidioc_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
> > drivers/media/platform/s5p-g2d/g2d.c:510:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
> >
> > This is fall-out from this commit:
> >
> > commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
> > Author: Hans Verkuil <hans.verkuil@cisco.com>
> > Date: Wed Sep 5 05:10:48 2012 -0300
> >
> > [media] v4l2: make vidioc_s_crop const
> >
> > Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>
> Aplied, thanks.
Just to be clear, you're taking care of these s5p patches through your tree, right?
Regards,
Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC PATCH 1/3] s5p-g2d: fix compiler warning
2012-10-04 6:43 ` Hans Verkuil
@ 2012-10-04 9:26 ` Sylwester Nawrocki
0 siblings, 0 replies; 9+ messages in thread
From: Sylwester Nawrocki @ 2012-10-04 9:26 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Hans Verkuil, linux-media, Anatolij Gustschin
On 10/04/2012 08:43 AM, Hans Verkuil wrote:
> On Wed October 3 2012 12:16:48 Sylwester Nawrocki wrote:
>> On 10/02/2012 10:57 AM, Hans Verkuil wrote:
>>> drivers/media/platform/s5p-g2d/g2d.c:535:2: warning: passing argument 3 of 'vidioc_try_crop' discards 'const' qualifier from pointer target type [enabled by default]
>>> drivers/media/platform/s5p-g2d/g2d.c:510:12: note: expected 'struct v4l2_crop *' but argument is of type 'const struct v4l2_crop *'
>>>
>>> This is fall-out from this commit:
>>>
>>> commit 4f996594ceaf6c3f9bc42b40c40b0f7f87b79c86
>>> Author: Hans Verkuil <hans.verkuil@cisco.com>
>>> Date: Wed Sep 5 05:10:48 2012 -0300
>>>
>>> [media] v4l2: make vidioc_s_crop const
>>>
>>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> Aplied, thanks.
>
> Just to be clear, you're taking care of these s5p patches through your tree, right?
Yes, from now on I will be picking all s5p/exynos patches from LMML
and sending it through my tree, were appropriate. In fact I have been
doing it already in most part. Same with other Samsung media drivers,
like camera sensors. I'll look what needs to be changed at the
MAINTAINERS file. This is to lower volume of patches that needs to be
handled by Mauro. Please Cc me on any s5p/Exynos patches.
--
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-10-04 9:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 8:57 [RFC PATCH 0/3] Three more patches to fix const issues Hans Verkuil
2012-10-02 8:57 ` [RFC PATCH 1/3] s5p-g2d: fix compiler warning Hans Verkuil
2012-10-02 8:57 ` [RFC PATCH 2/3] s5p-fimc: " Hans Verkuil
2012-10-03 10:16 ` Sylwester Nawrocki
2012-10-02 8:57 ` [RFC PATCH 3/3] fsl-viu: " Hans Verkuil
2012-10-02 9:18 ` Anatolij Gustschin
2012-10-03 10:16 ` [RFC PATCH 1/3] s5p-g2d: " Sylwester Nawrocki
2012-10-04 6:43 ` Hans Verkuil
2012-10-04 9:26 ` Sylwester Nawrocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).