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. :( regards, dan carpenter