linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Jerome Brunet <jbrunet@baylibre.com>,
	Michael Turquette <mturquette@baylibre.com>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	Douglas Anderson <dianders@chromium.org>,
	Heiko Stuebner <heiko@sntech.de>
Subject: Re: [PATCH v2 1/4] clk: Don't cache errors from clk_ops::get_phase()
Date: Wed, 12 Feb 2020 15:27:59 -0800	[thread overview]
Message-ID: <158155007950.184098.15676908208357845365@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <1jv9okazq9.fsf@starbuckisacylon.baylibre.com>

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.

  reply	other threads:[~2020-02-12 23:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 23:27 [PATCH v2 0/4] clk_phase error caching problems Stephen Boyd
2020-02-05 23:27 ` [PATCH v2 1/4] clk: Don't cache errors from clk_ops::get_phase() Stephen Boyd
2020-02-06  8:26   ` Jerome Brunet
2020-02-12 23:27     ` Stephen Boyd [this message]
2020-02-12 23:28   ` Stephen Boyd
2020-02-05 23:28 ` [PATCH v2 2/4] clk: Use 'parent' to shorten lines in __clk_core_init() Stephen Boyd
2020-02-12 23:28   ` Stephen Boyd
2020-02-05 23:28 ` [PATCH v2 3/4] clk: Move rate and accuracy recalc to mostly consumer APIs Stephen Boyd
2020-02-12 23:28   ` Stephen Boyd
2020-02-05 23:28 ` [PATCH v2 4/4] clk: Bail out when calculating phase fails during clk registration Stephen Boyd
2020-02-12 23:28   ` Stephen Boyd
2020-02-06  8:27 ` [PATCH v2 0/4] clk_phase error caching problems Jerome Brunet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=158155007950.184098.15676908208357845365@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=dianders@chromium.org \
    --cc=heiko@sntech.de \
    --cc=jbrunet@baylibre.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).