linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com,
	Kieran Bingham <kieran.bingham@ideasonboard.com>
Subject: Re: [PATCH 7/6] omap4iss: fix sparse warning
Date: Thu, 7 Feb 2019 17:47:14 +0200	[thread overview]
Message-ID: <20190207154714.GA10386@pendragon.ideasonboard.com> (raw)
In-Reply-To: <546e17e7-310c-faaf-ae13-a1b005f40579@xs4all.nl>

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;
> 

-- 
Regards,

Laurent Pinchart

      parent reply	other threads:[~2019-02-07 15:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  9:13 [PATCH 0/6] sparse/smatch fixes Hans Verkuil
2019-02-07  9:13 ` [PATCH 1/6] hdpvr: fix smatch warning Hans Verkuil
2019-02-07  9:13 ` [PATCH 2/6] vim2m: " Hans Verkuil
2019-02-07  9:13 ` [PATCH 3/6] uvc: " Hans Verkuil
2019-02-07 14:57   ` Kieran Bingham
2019-02-07 15:41     ` Laurent Pinchart
2019-02-07 16:35       ` Hans Verkuil
2019-02-07  9:13 ` [PATCH 4/6] vsp1: " Hans Verkuil
2019-02-12 13:48   ` Kieran Bingham
2019-02-12 16:31     ` Laurent Pinchart
2019-02-07  9:13 ` [PATCH 5/6] omap3isp: fix sparse warning Hans Verkuil
2019-02-07  9:18   ` Hans Verkuil
2019-02-07 14:23   ` Sakari Ailus
2019-02-07 15:45   ` Laurent Pinchart
2019-02-07  9:13 ` [PATCH 6/6] pxa_camera: fix smatch warning Hans Verkuil
2019-02-07 14:11   ` Sakari Ailus
2019-02-07 14:38   ` [PATCH 7/6] omap4iss: fix sparse warning Hans Verkuil
2019-02-07 14:51     ` Sakari Ailus
2019-02-07 15:47     ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190207154714.GA10386@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).