linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-sparse@vger.kernel.org
Subject: Re: Context imbalance false positive
Date: Fri, 18 Jul 2008 07:25:18 -0700	[thread overview]
Message-ID: <43e72e890807180725q4e1f0c8fu1da7185ade275aa1@mail.gmail.com> (raw)
In-Reply-To: <1216369525.27738.4.camel@johannes.berg>

On Fri, Jul 18, 2008 at 1:25 AM, Johannes Berg
<johannes@sipsolutions.net> 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

      reply	other threads:[~2008-07-18 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 23:52 Context imbalance false positive Luis R. Rodriguez
2008-07-18  8:25 ` Johannes Berg
2008-07-18 14:25   ` Luis R. Rodriguez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43e72e890807180725q4e1f0c8fu1da7185ade275aa1@mail.gmail.com \
    --to=mcgrof@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).