lkml.org 
[lkml]   [2020]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/4] clk: Don't cache errors from clk_ops::get_phase()
From
Date
Quoting Jerome Brunet (2020-02-06 00:26:06)
>
> On Thu 06 Feb 2020 at 00:27, Stephen Boyd <sboyd@kernel.org> wrote:
>
> > We don't check for errors from clk_ops::get_phase() before storing away
> > the result into the clk_core::phase member. This can lead to some fairly
> > confusing debugfs information if these ops do return an error. Let's
> > skip the store when this op fails to fix this. While we're here, move
> > the locking outside of clk_core_get_phase() to simplify callers from
> > the debugfs side.
> >
> > Cc: Douglas Anderson <dianders@chromium.org>
> > Cc: Heiko Stuebner <heiko@sntech.de>
> > Cc: Jerome Brunet <jbrunet@baylibre.com>
> > Signed-off-by: Stephen Boyd <sboyd@kernel.org>
> > ---
> > drivers/clk/clk.c | 48 +++++++++++++++++++++++++++++++----------------
> > 1 file changed, 32 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > index d529ad67805c..26213e82f5f9 100644
> > --- a/drivers/clk/clk.c
> > +++ b/drivers/clk/clk.c
> > @@ -2660,12 +2660,14 @@ static int clk_core_get_phase(struct clk_core *core)
> > {
> > int ret;
> >
> > - clk_prepare_lock();
>
> Should the function name get the "_nolock" suffix then ?
>

I figure we can add such a one if clk_core_ prefix isn't enough to
differentiate.

\
 
 \ /
  Last update: 2020-02-13 00:28    [W:0.075 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site