On Sat, 2009-03-21 at 13:49 +0100, Michael Buesch wrote: > > > Well I think it would currently generate lots of errors, because we have > > > code like this in the kernel: > > > > > > if (x) > > > mutex_lock(); > > > ... > > > if (x) > > > mutex_unlock(); > > > > That's sloppy code anyway. Not to be encouraged. > > That's not true. Sometimes it is the cleanest way to do things. > Look at drivers/ssb/main.c. To make this mutex-sparse compliant, we'd > need to introduce quite a few sub-functions. > > It simply is a limitation of sparse. Nothing else. No, I still think it's sloppy code; some future work will in most cases invariably move the conditions further apart, at which point it becomes more and more unlikely that the invariant that the "x" doesn't change inbetween is maintained. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part