Re: [patch 3/9] input: ads7846.c sparse lock annotation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-05-13 at 20:24 -0700, Dmitry Torokhov wrote:
> On Tue, May 12, 2009 at 01:43:06PM -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > From: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> > 
> > Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>
> > Cc: Dmitry Torokhov <dtor@xxxxxxx>
> > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > ---
> >  
> >  /* 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)

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

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux