Re: [PATCH 01/11] MFD: DA9052 MFD core module v2

From: Arnd Bergmann
Date: Thu Jul 21 2011 - 16:40:40 EST


On Thursday 21 July 2011 16:47:48 Mark Brown wrote:
> On Thu, Jul 21, 2011 at 11:46:32PM +0800, Shawn Guo wrote:
> > On Tue, Jul 05, 2011 at 08:07:00PM +0530, ashishj3 wrote:
>
> > > + mutex_lock_interruptible(&da9052->io_lock);
>
> > Compile warning as below.
>
> > "warning: ignoring return value of âmutex_lock_interruptibleâ,
> > declared with attribute warn_unused_result"
>
> Although the bigger problem is why are these interruptible? That's
> very unusual.

Well, the default should really be to use _interruptible or at least
_killable with the appropriate error handling, and only use noninterruptible
locks in cases where that's not possible.

In the funtions that Shawn pointed out, there is an error return, so it would
be possible to do that, but the callers would need to be audited carefully.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/