Re: [PATCH] regulator: core: avoid unused variable warning

From: Arnd Bergmann
Date: Tue Oct 13 2015 - 15:28:21 EST


On Monday 12 October 2015 16:42:31 Mark Brown wrote:
> On Fri, Oct 09, 2015 at 02:36:47PM +0200, Arnd Bergmann wrote:
>
> > The second argument of the mutex_lock_nested() helper is only
> > evaluated if CONFIG_DEBUG_LOCK_ALLOC is set. Otherwise we
> > get this build warning for the new regulator_lock_supply
> > function:
>
> Shouldn't we have an annotation or something for this in
> mutex_lock_nested()? It seems like something that might come up
> elsewhere and it's a bit of a surprise to have one of the arguments
> there not be evaluated.
>

I've found a better solution by making mutex_lock_nested an
inline function. Will send a new patch.

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/