On Fri, Jul 18, 2008 at 1:25 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Thu, 2008-07-17 at 16:52 -0700, Luis R. Rodriguez wrote: >> I'm not sure how to resolve a situation like this: > >> static void lock(int bh_flag) >> { >> if (bh_flag) >> spin_lock_bh(&some_lock); >> else >> spin_lock(&some_lock); > > The only generally accepted way is to not program locking dependent on > flags. Agreed, and that's what I'm trying to do actually. I think the above is pure absolute garbage. > You can sneak in sparse annotations to do it anyway, but I won't tell > you how :) If you mean by __acquires() and __releases() then that didn't help. Luis -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html