diff mbox

[RFC,1/3] s5p-g2d: fix compiler warning

Message ID 760bdb23b40b9ce3a8044a3379510889db4bfcf7.1349168132.git.hans.verkuil@cisco.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans Verkuil Oct. 2, 2012, 8:57 a.m. UTC
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(-)

Comments

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hans Verkuil Oct. 4, 2012, 6:43 a.m. UTC | #2
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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;