From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: linux-sparse@vger.kernel.org
Subject: Re: Context imbalance false positive
Date: Fri, 18 Jul 2008 10:25:25 +0200 [thread overview]
Message-ID: <1216369525.27738.4.camel@johannes.berg> (raw)
In-Reply-To: <43e72e890807171652r133c973dh160ea28d361a4601@mail.gmail.com> (sfid-20080718_015238_326183_A8E7DB76)
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
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.
You can sneak in sparse annotations to do it anyway, but I won't tell
you how :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2008-07-18 8: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 [this message]
2008-07-18 14:25 ` Luis R. Rodriguez
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=1216369525.27738.4.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-sparse@vger.kernel.org \
--cc=mcgrof@gmail.com \
/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).