From: David Brownell <david-b@pacbell.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-sparse@vger.kernel.org
Subject: Re: sparse context warning problem ...
Date: Sat, 10 May 2008 20:18:13 -0700 [thread overview]
Message-ID: <200805102018.13358.david-b@pacbell.net> (raw)
In-Reply-To: <1210466447.3646.3.camel@johannes.berg>
On Saturday 10 May 2008, Johannes Berg wrote:
> This is probably my mistake.
>
> However, I took __releases and __acquires to mean that this function
> *changed* the context, doing both doesn't really make much sense. I
> think the function should actually be declared
>
> static void
> finish_urb(...)
> __requires(ohci->lock)
> {...}
>
> where __requires is (for sparse) defined as
>
> #define __requires(x) __attribute__((context(x,1,1)))
ISTR suggesting special syntax for this to Linus (this was way
back when "sparse" was just starting) and he wanted to just do
it by having those two attributes.
So at this point, I'd want to see the regression fixed (and the
tests updated to avoid this in the future) before exploring any
alternative syntax for kernel annotations.
On the plus side, having syntax *IS* more general. It can serve
as an annotation that the function requires particular locking
context, whether or not that context is explicitly accessed.
- Dave
> It's probably possible to merge the __acquires and __releases into one
> though.
next prev parent reply other threads:[~2008-05-11 3:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-11 0:24 sparse context warning problem David Brownell
2008-05-11 0:40 ` Johannes Berg
2008-05-11 3:18 ` David Brownell [this message]
2008-05-11 9:46 ` Johannes Berg
2008-05-13 21:52 ` Johannes Berg
2008-05-14 13:58 ` David Brownell
2008-05-14 14:06 ` Johannes Berg
2008-05-29 8:47 ` Johannes Berg
2008-05-29 9:39 ` David Brownell
2008-05-29 9:54 ` Johannes Berg
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=200805102018.13358.david-b@pacbell.net \
--to=david-b@pacbell.net \
--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).