From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: akpm@linux-foundation.org, linux-input@vger.kernel.org
Subject: Re: [patch 3/9] input: ads7846.c sparse lock annotation
Date: Wed, 13 May 2009 20:51:45 -0700 [thread overview]
Message-ID: <20090514035135.GF12778@dtor-d630.eng.vmware.com> (raw)
In-Reply-To: <1242272067.23058.3.camel@brick>
On Wed, May 13, 2009 at 08:34:27PM -0700, Harvey Harrison wrote:
> On Wed, 2009-05-13 at 20:24 -0700, Dmitry Torokhov wrote:
> > On Tue, May 12, 2009 at 01:43:06PM -0700, akpm@linux-foundation.org wrote:
> > > From: Harvey Harrison <harvey.harrison@gmail.com>
> > >
> > > Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
> > > Cc: Dmitry Torokhov <dtor@mail.ru>
> > > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > > ---
> > >
> > > /* Must be called with ts->lock held */
> > > static void ads7846_disable(struct ads7846 *ts)
> > > +__releases(&ts->lock)
> > > +__acquires(&ts->lock)
> > > {
> >
> > I still haven't gotten any explanation why this is needed and also I am
> > still getting sparce warnings with this patch applied. Please drop.
> >
>
> Sorry, I didn't realize I had a local patchset doing extra context checking
> of what lock is passed in to spin_lock/unlock...it helps to document when a
> function requires a lock held (see the comment)
>
I understand the comment ;) The annotation syntax is confusing though...
Maybe if instead of __releases and __acquires it said __needs_lock() and
__leaves_locked() that would make more sense...
> The culprit in this function:
> while (ts->pending) {
> spin_unlock_irq(&ts->lock);
> msleep(1);
> spin_lock_irq(&ts->lock);
> }
>
> Anyways, as current sparse will still warn please drop.
>
> Harvey
>
--
Dmitry
next prev parent reply other threads:[~2009-05-14 3:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-12 20:43 [patch 3/9] input: ads7846.c sparse lock annotation akpm
2009-05-14 3:24 ` Dmitry Torokhov
2009-05-14 3:34 ` Harvey Harrison
2009-05-14 3:51 ` Dmitry Torokhov [this message]
2009-05-14 14:45 ` Jiri Kosina
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=20090514035135.GF12778@dtor-d630.eng.vmware.com \
--to=dmitry.torokhov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=harvey.harrison@gmail.com \
--cc=linux-input@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).