On 2/7/19 10:13 AM, Hans Verkuil wrote:
> drivers/media/platform/omap3isp/ispvideo.c:1013:15: warning: unknown 
> expression (4 0)

I should add this text to the commit log:

The combination of the v4l2_subdev_call and media_entity_to_v4l2_subdev macros
became too complex for sparse. So first assign the result of
media_entity_to_v4l2_subdev to a struct v4l2_subdev *sd variable, then
use that in v4l2_subdev_call.

Regards,

        Hans

> 
> Signed-off-by: Hans Verkuil <hverkuil-ci...@xs4all.nl>
> ---
>  drivers/media/platform/omap3isp/ispvideo.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/omap3isp/ispvideo.c 
> b/drivers/media/platform/omap3isp/ispvideo.c
> index 078d64114b24..911dfad90d32 100644
> --- a/drivers/media/platform/omap3isp/ispvideo.c
> +++ b/drivers/media/platform/omap3isp/ispvideo.c
> @@ -974,6 +974,7 @@ static int isp_video_check_external_subdevs(struct 
> isp_video *video,
>       struct media_entity *source = NULL;
>       struct media_entity *sink;
>       struct v4l2_subdev_format fmt;
> +     struct v4l2_subdev *sd;
>       struct v4l2_ext_controls ctrls;
>       struct v4l2_ext_control ctrl;
>       unsigned int i;
> @@ -1010,8 +1011,8 @@ static int isp_video_check_external_subdevs(struct 
> isp_video *video,
>  
>       fmt.pad = source_pad->index;
>       fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
> -     ret = v4l2_subdev_call(media_entity_to_v4l2_subdev(sink),
> -                            pad, get_fmt, NULL, &fmt);
> +     sd = media_entity_to_v4l2_subdev(sink);
> +     ret = v4l2_subdev_call(sd, pad, get_fmt, NULL, &fmt);
>       if (unlikely(ret < 0)) {
>               dev_warn(isp->dev, "get_fmt returned null!\n");
>               return ret;
> 

Reply via email to