From: Linus T. <tor...@li...> - 2009-05-31 17:09:33
|
On Sun, 31 May 2009, Krzysztof Helt wrote: > > static int atafb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) > +__acquires(&info->mm_lock) > +__releases(&info->mm_lock) Btw, you shouldn't do this when things nest "correctly" - sparse will see the fact that the function acquires and releases a lock and is perfectly happy. The extra annotations are helpful only if you have a function that does something _unexpected_ to a lock, like first releasing it and then re-aqcuiring it, or releasing it without acquiring it at all. Then the extra annotations (a) tell sparse not to complain about odd locking, and (b) act as visual notification to users that this function drops a lock in the middle. I haven't actually looked at the patch yet, I just reacted to this part of it. Linus |