Re: regulator: build warning in regulator_lock_supply()
From: Sascha Hauer
Date: Tue Nov 10 2015 - 02:36:57 EST
On Mon, Nov 09, 2015 at 07:21:48PM -0800, Frank Rowand wrote:
> In the current Linus tree, new build warning.
>
> When CONFIG_DEBUG_LOCK_ALLOC is not enabled,
>
> drivers/regulator/core.c: In function 'regulator_lock_supply':
> drivers/regulator/core.c:142:6: warning: unused variable 'i' [-Wunused-variable]
>
>
> Introduced by commit
>
> 9f01cd4a915e1 ("regulator: core: introduce function to lock regulators and its supplies")
We could fix this with the following patch. On the other hand I'd say
that it's not our fault that mutex_lock_nested() doesn't use the
variable, so maybe it should rather be a static inline function instead
of a define?
Sascha
---------------------------------8<-------------------------------