All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	linux-media@vger.kernel.org,
	Kieran Bingham <kieran.bingham@ideasonboard.com>
Subject: Re: [GIT PULL FOR v4.18] R-Car VSP1 TLB optimisation
Date: Mon, 28 May 2018 14:07:53 +0300	[thread overview]
Message-ID: <20180528110753.ixcuufo6ps2ss5te@mwanda> (raw)
In-Reply-To: <3330729.SuyROXNipa@avalon>

On Mon, May 28, 2018 at 01:54:18PM +0300, Laurent Pinchart wrote:
> Hi Dan,
> 
> Thank you for your quick reply.
> 
> On Monday, 28 May 2018 13:20:49 EEST Dan Carpenter wrote:
> > On Mon, May 28, 2018 at 11:28:41AM +0300, Laurent Pinchart wrote:
> > > and I still get the same warning. I had to write the following (which is
> > > obviously not correct) to silence the warning.
> > > 
> > >         if (pipe->num_inputs > 2)
> > >                 brx = &vsp1->bru->entity;
> > >         else if (pipe->brx)
> > >                 brx = pipe->brx;
> > >         else if (!vsp1->bru->entity.pipe)
> > >                 brx = &vsp1->bru->entity;
> > >         else {
> > >                 (void)vsp1->brs->entity;
> > >                 brx = &vsp1->brs->entity;
> > >         }
> > > 
> > > Both the (void)vsp1->brs->entity and the removal of the !drm_pipe->
> > > force_brx_release were needed, any of those on its own didn't fix the
> > > problem.
> > 
> > The problem in this case is the first "brx = &vsp1->bru->entity;".
> > Smatch assumes &vsp1->bru->entity can be == to pipe->brx and NULL.
> 
> Why does smatch assume that &vsp1->bru->entity can be NULL, when the previous 
> line dereferences vsp1->bru ?

I'm talking about when pipe->num_inputs > 2.  For the second
"brx = &vsp1->bru->entity;" assignment, then Smatch parses it correctly
as you say.

regards,
dan carpenter

  reply	other threads:[~2018-05-28 11:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-20 12:10 [GIT PULL FOR v4.18] R-Car VSP1 TLB optimisation Laurent Pinchart
2018-05-25 23:10 ` Mauro Carvalho Chehab
2018-05-25 23:39   ` Laurent Pinchart
2018-05-26  0:24     ` Laurent Pinchart
2018-05-26 11:28       ` Mauro Carvalho Chehab
2018-05-28  8:28         ` Laurent Pinchart
2018-05-28  8:31           ` Laurent Pinchart
2018-05-28 10:17             ` Mauro Carvalho Chehab
2018-05-28 11:18               ` Dan Carpenter
2018-05-28 10:36             ` Dan Carpenter
2018-05-28 10:58               ` Laurent Pinchart
2018-05-28 12:10                 ` Dan Carpenter
2018-05-28 10:03           ` Mauro Carvalho Chehab
2018-05-28 10:48             ` Laurent Pinchart
2018-05-28 10:57             ` Dan Carpenter
2018-05-28 10:20           ` Dan Carpenter
2018-05-28 10:54             ` Laurent Pinchart
2018-05-28 11:07               ` Dan Carpenter [this message]
2018-05-28 10:17         ` Dan Carpenter
2018-05-28 10:25     ` Kieran Bingham

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=20180528110753.ixcuufo6ps2ss5te@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.