The patch number 14397 was added via Douglas Schilling Landgraf
<[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>
------
From: M?rton N?meth <[email protected]>
The first two parameters of soc_camera_limit_side() are usually pointers to
struct v4l2_rect elements. They are signed, so adjust the prototype accordingly
This will remove the following sparse warning (see "make C=1"):
* incorrect type in argument 1 (different signedness)
expected unsigned int *start
got signed int *<noident>
as well as a couple more signedness mismatches.
Priority: normal
Signed-off-by: M?rton N?meth <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
linux/drivers/media/video/mt9v022.c | 2 -
linux/drivers/media/video/mx3_camera.c | 4 +--
linux/drivers/media/video/rj54n1cb0c.c | 18 +++++++--------
linux/drivers/media/video/sh_mobile_ceu_camera.c | 8 +++---
linux/include/media/soc_camera.h | 4 +--
5 files changed, 18 insertions(+), 18 deletions(-)
diff -r dea52d21c348 -r 3612456e80ea linux/drivers/media/video/mt9v022.c
--- a/linux/drivers/media/video/mt9v022.c Sat Mar 06 20:44:57 2010 -0300
+++ b/linux/drivers/media/video/mt9v022.c Sat Mar 06 20:48:47 2010 -0300
@@ -325,7 +325,7 @@
if (ret < 0)
return ret;
- dev_dbg(&client->dev, "Frame %ux%u pixel\n", rect.width, rect.height);
+ dev_dbg(&client->dev, "Frame %dx%d pixel\n", rect.width, rect.height);
mt9v022->rect = rect;
diff -r dea52d21c348 -r 3612456e80ea linux/drivers/media/video/mx3_camera.c
--- a/linux/drivers/media/video/mx3_camera.c Sat Mar 06 20:44:57 2010 -0300
+++ b/linux/drivers/media/video/mx3_camera.c Sat Mar 06 20:48:47 2010 -0300
@@ -796,7 +796,7 @@
* FIXME: learn to use stride != width, then we can keep stride properly
aligned
* and support arbitrary (even) widths.
*/
-static inline void stride_align(__s32 *width)
+static inline void stride_align(__u32 *width)
{
if (((*width + 7) & ~7) < 4096)
*width = (*width + 7) & ~7;
@@ -844,7 +844,7 @@
* So far only direct camera-to-memory is supported
*/
if (channel_change_requested(icd, rect)) {
- int ret = acquire_dma_channel(mx3_cam);
+ ret = acquire_dma_channel(mx3_cam);
if (ret < 0)
return ret;
}
diff -r dea52d21c348 -r 3612456e80ea linux/drivers/media/video/rj54n1cb0c.c
--- a/linux/drivers/media/video/rj54n1cb0c.c Sat Mar 06 20:44:57 2010 -0300
+++ b/linux/drivers/media/video/rj54n1cb0c.c Sat Mar 06 20:48:47 2010 -0300
@@ -555,15 +555,15 @@
return ret;
}
-static int rj54n1_sensor_scale(struct v4l2_subdev *sd, u32 *in_w, u32 *in_h,
- u32 *out_w, u32 *out_h);
+static int rj54n1_sensor_scale(struct v4l2_subdev *sd, s32 *in_w, s32 *in_h,
+ s32 *out_w, s32 *out_h);
static int rj54n1_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
{
struct i2c_client *client = sd->priv;
struct rj54n1 *rj54n1 = to_rj54n1(client);
struct v4l2_rect *rect = &a->c;
- unsigned int dummy = 0, output_w, output_h,
+ int dummy = 0, output_w, output_h,
input_w = rect->width, input_h = rect->height;
int ret;
@@ -577,7 +577,7 @@
output_w = (input_w * 1024 + rj54n1->resize / 2) / rj54n1->resize;
output_h = (input_h * 1024 + rj54n1->resize / 2) / rj54n1->resize;
- dev_dbg(&client->dev, "Scaling for %ux%u : %u = %ux%u\n",
+ dev_dbg(&client->dev, "Scaling for %dx%d : %u = %dx%d\n",
input_w, input_h, rj54n1->resize, output_w, output_h);
ret = rj54n1_sensor_scale(sd, &input_w, &input_h, &output_w, &output_h);
@@ -638,8 +638,8 @@
* the output one, updates the window sizes and returns an error or the resize
* coefficient on success. Note: we only use the "Fixed Scaling" on this
camera.
*/
-static int rj54n1_sensor_scale(struct v4l2_subdev *sd, u32 *in_w, u32 *in_h,
- u32 *out_w, u32 *out_h)
+static int rj54n1_sensor_scale(struct v4l2_subdev *sd, s32 *in_w, s32 *in_h,
+ s32 *out_w, s32 *out_h)
{
struct i2c_client *client = sd->priv;
struct rj54n1 *rj54n1 = to_rj54n1(client);
@@ -749,7 +749,7 @@
* improve the image quality or stability for larger frames (see comment
* above), but I didn't check the framerate.
*/
- skip = min(resize / 1024, (unsigned)15);
+ skip = min(resize / 1024, 15U);
inc_sel = 1 << skip;
@@ -819,7 +819,7 @@
*out_w = output_w;
*out_h = output_h;
- dev_dbg(&client->dev, "Scaled for %ux%u : %u = %ux%u, skip %u\n",
+ dev_dbg(&client->dev, "Scaled for %dx%d : %u = %ux%u, skip %u\n",
*in_w, *in_h, resize, output_w, output_h, skip);
return resize;
@@ -1017,7 +1017,7 @@
struct i2c_client *client = sd->priv;
struct rj54n1 *rj54n1 = to_rj54n1(client);
const struct rj54n1_datafmt *fmt;
- unsigned int output_w, output_h, max_w, max_h,
+ int output_w, output_h, max_w, max_h,
input_w = rj54n1->rect.width, input_h = rj54n1->rect.height;
int ret;
diff -r dea52d21c348 -r 3612456e80ea
linux/drivers/media/video/sh_mobile_ceu_camera.c
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c Sat Mar 06 20:44:57
2010 -0300
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c Sat Mar 06 20:48:47
2010 -0300
@@ -1041,13 +1041,13 @@
*/
if (!memcmp(rect, cam_rect, sizeof(*rect))) {
/* Even if camera S_CROP failed, but camera rectangle matches */
- dev_dbg(dev, "Camera S_CROP successful for %u...@%u:%u\n",
+ dev_dbg(dev, "Camera S_CROP successful for %d...@%d:%d\n",
rect->width, rect->height, rect->left, rect->top);
return 0;
}
/* Try to fix cropping, that camera hasn't managed to set */
- dev_geo(dev, "Fix camera S_CROP for %u...@%u:%u to %u...@%u:%u\n",
+ dev_geo(dev, "Fix camera S_CROP for %d...@%d:%d to %d...@%d:%d\n",
cam_rect->width, cam_rect->height,
cam_rect->left, cam_rect->top,
rect->width, rect->height, rect->left, rect->top);
@@ -1103,7 +1103,7 @@
v4l2_subdev_call(sd, video, s_crop, cam_crop);
ret = client_g_rect(sd, cam_rect);
- dev_geo(dev, "Camera S_CROP %d for %u...@%u:%u\n", ret,
+ dev_geo(dev, "Camera S_CROP %d for %d...@%d:%d\n", ret,
cam_rect->width, cam_rect->height,
cam_rect->left, cam_rect->top);
}
@@ -1117,7 +1117,7 @@
*cam_rect = cap.bounds;
v4l2_subdev_call(sd, video, s_crop, cam_crop);
ret = client_g_rect(sd, cam_rect);
- dev_geo(dev, "Camera S_CROP %d for max %u...@%u:%u\n", ret,
+ dev_geo(dev, "Camera S_CROP %d for max %d...@%d:%d\n", ret,
cam_rect->width, cam_rect->height,
cam_rect->left, cam_rect->top);
}
diff -r dea52d21c348 -r 3612456e80ea linux/include/media/soc_camera.h
--- a/linux/include/media/soc_camera.h Sat Mar 06 20:44:57 2010 -0300
+++ b/linux/include/media/soc_camera.h Sat Mar 06 20:48:47 2010 -0300
@@ -266,8 +266,8 @@
common_flags;
}
-static inline void soc_camera_limit_side(unsigned int *start,
- unsigned int *length, unsigned int start_min,
+static inline void soc_camera_limit_side(int *start, int *length,
+ unsigned int start_min,
unsigned int length_min, unsigned int length_max)
{
if (*length < length_min)
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/3612456e80ea707be0621286047ffae6ed09433e
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits