From: Dan Carpenter <error27@gmail.com>
To: Benjamin MUGNIER <benjamin.mugnier@foss.st.com>
Cc: oe-kbuild@lists.linux.dev, lkp@intel.com,
oe-kbuild-all@lists.linux.dev, linux-media@vger.kernel.org,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [sailus-media-tree:master 17/47] drivers/media/i2c/st-vgxy61.c:891 vgxy61_apply_gpiox_strobe_mode() warn: impossible condition '(reg < 0) => (0-u16max < 0)'
Date: Thu, 10 Nov 2022 17:06:17 +0300 [thread overview]
Message-ID: <Y20FWdCTPiKWOdNd@kadam> (raw)
In-Reply-To: <Y20ErxBkDVVGzYim@kadam>
On Thu, Nov 10, 2022 at 05:03:27PM +0300, Dan Carpenter wrote:
> On Thu, Nov 10, 2022 at 04:11:59PM +0300, Dan Carpenter wrote:
> > On Thu, Nov 10, 2022 at 12:43:30PM +0100, Benjamin MUGNIER wrote:
> > > After running smatch on my tree I couldn't reproduce this warning:
> > > warn: pm_runtime_get_sync() also returns 1 on success
> > > I'm using the latest smatch cloned from github. Do you append some
> > > options to kchecker to get this output ?
> >
> > TL;DR: Thanks for the report! I will fix it later this week.
> >
>
> [ snip ]
>
> > It creates a fake environment to test what !ret means
> > for uninitialized variables. The check_pm_runtime_get_sync.c check sees
> > the "!ret" condition and says, "Nope. That's supposed to be "ret < 0"".
> >
> > Smatch shouldn't be printing warnings from inside the fake environment.
>
> Nope. That's not it... It already has code to not print from a fake
> environment (unless you're in debug mode). It's a mystery how the
> kbuild bot triggered this warning.
>
> :(
Ah... Seeing your patch helped me figure it out. The kbuild bot does
not have the cross function db built so when it sees:
vgxy61_write_reg(sensor, VGXY61_REG_ROI0_START_V, crop->top, &ret);
Then it doesn't see that "ret" is modified. On my system I have the
DB so I don't see the warning.
regards,
dan carpenter
next prev parent reply other threads:[~2022-11-10 14:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 5:19 [sailus-media-tree:master 17/47] drivers/media/i2c/st-vgxy61.c:891 vgxy61_apply_gpiox_strobe_mode() warn: impossible condition '(reg < 0) => (0-u16max < 0)' Dan Carpenter
2022-11-10 11:43 ` Benjamin MUGNIER
2022-11-10 13:11 ` Dan Carpenter
2022-11-10 14:03 ` Dan Carpenter
2022-11-10 14:06 ` Dan Carpenter [this message]
2022-11-10 15:04 ` Benjamin MUGNIER
2022-11-10 15:33 ` Dan Carpenter
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=Y20FWdCTPiKWOdNd@kadam \
--to=error27@gmail.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=linux-media@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--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