lkml.org 
[lkml]   [2015]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mutex: make mutex_lock_nested an inline function
On Wed, Oct 14, 2015 at 11:00:20AM +0200, Arnd Bergmann wrote:
> On Wednesday 14 October 2015 10:37:07 Peter Zijlstra wrote:

> > > Uuh, I just looked at next and saw this regulator_lock_supply()
> > > function. How is that limited? subclass must be <8 otherwise bad things
> > > happen.
> >
> > Also, the function appears unused, just delete it
>
> That was my first suggestion as well when I ran into
>
> drivers/regulator/core.c:139:13: warning: 'regulator_lock_supply' defined but not used
>
> but apparently this is work-in-progress and the plan is to use it
> in 4.4 when the rest of the currently-under-review patches are merged.

And here I thought we had a fairly strong rule that we should not merge
unused code :/

In any case, whomever wrote that function had better first explain why
its not broken.

And I'm not too keen on making mutex_lock_nested() an inline due it
being too easy to generate code with it. I'd much rather work around the
occasional warning than have to deal with silent but unintended code
spills.


\
 
 \ /
  Last update: 2015-10-14 11:41    [W:0.061 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site