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