Message ID | 546e17e7-310c-faaf-ae13-a1b005f40579@xs4all.nl (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sparse/smatch fixes | expand |
On Thu, Feb 07, 2019 at 03:38:02PM +0100, Hans Verkuil wrote: > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> > --- > Same fix as for omap3isp. I discovered that staging drivers weren't built by the > daily build, so I never noticed these warnings. Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Hi Hans, Thank you for the patch. On Thu, Feb 07, 2019 at 03:38:02PM +0100, Hans Verkuil wrote: > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) > > Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> > --- > Same fix as for omap3isp. I discovered that staging drivers weren't built by the > daily build, so I never noticed these warnings. Same answer as for the omap3isp driver then :-) Let's fix the tool please. Dan Carpenter has been very supportive when we reported smatch issues in the past, let's work with him to improve the tool instead of patching all current and future kernel code to work around the problem. > --- > diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c > index c8be1db532ab..fd702947cdb8 100644 > --- a/drivers/staging/media/omap4iss/iss.c > +++ b/drivers/staging/media/omap4iss/iss.c > @@ -124,6 +124,7 @@ int omap4iss_get_external_info(struct iss_pipeline *pipe, > { > struct iss_device *iss = > container_of(pipe, struct iss_video, pipe)->iss; > + struct v4l2_subdev *sd; > struct v4l2_subdev_format fmt; > struct v4l2_ctrl *ctrl; > int ret; > @@ -138,8 +139,8 @@ int omap4iss_get_external_info(struct iss_pipeline *pipe, > > fmt.pad = link->source->index; > fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; > - ret = v4l2_subdev_call(media_entity_to_v4l2_subdev(link->sink->entity), > - pad, get_fmt, NULL, &fmt); > + sd = media_entity_to_v4l2_subdev(link->sink->entity); > + ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt); > if (ret < 0) > return -EPIPE; >
diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index c8be1db532ab..fd702947cdb8 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -124,6 +124,7 @@ int omap4iss_get_external_info(struct iss_pipeline *pipe, { struct iss_device *iss = container_of(pipe, struct iss_video, pipe)->iss; + struct v4l2_subdev *sd; struct v4l2_subdev_format fmt; struct v4l2_ctrl *ctrl; int ret; @@ -138,8 +139,8 @@ int omap4iss_get_external_info(struct iss_pipeline *pipe, fmt.pad = link->source->index; fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; - ret = v4l2_subdev_call(media_entity_to_v4l2_subdev(link->sink->entity), - pad, get_fmt, NULL, &fmt); + sd = media_entity_to_v4l2_subdev(link->sink->entity); + ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt); if (ret < 0) return -EPIPE;
drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) drivers/staging/media/omap4iss/iss.c:141:15: warning: unknown expression (4 0) Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> --- Same fix as for omap3isp. I discovered that staging drivers weren't built by the daily build, so I never noticed these warnings. ---