linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: Stephen Boyd <sboyd@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org,
	mturquette@baylibre.com, michal.simek@xilinx.com,
	rajan.vaja@xilinx.com, kernel@pengutronix.de
Subject: Re: [PATCH] clk: zynqmp: warn always when a clock op fails
Date: Fri, 14 Jan 2022 09:14:42 +0100	[thread overview]
Message-ID: <20220114081442.GR26783@pengutronix.de> (raw)
In-Reply-To: <20220112202937.034D9C36AE5@smtp.kernel.org>

On Wed, 12 Jan 2022 12:29:35 -0800, Stephen Boyd wrote:
> Quoting Michael Tretter (2022-01-12 06:12:29)
> > The warning that a clock operation failed is only printed once. However,
> > the function is called for various different clocks. The limit hides
> > warnings if different clock are affected by the failures.
> > 
> > Print the warning every time when a clock operation fails.
> > 
> > Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> > ---
> >  drivers/clk/zynqmp/clk-gate-zynqmp.c | 12 +++++------
> >  drivers/clk/zynqmp/clk-mux-zynqmp.c  |  8 +++----
> >  drivers/clk/zynqmp/divider.c         | 12 +++++------
> >  drivers/clk/zynqmp/pll.c             | 32 ++++++++++++++--------------
> >  4 files changed, 32 insertions(+), 32 deletions(-)
> > 
> > diff --git a/drivers/clk/zynqmp/clk-gate-zynqmp.c b/drivers/clk/zynqmp/clk-gate-zynqmp.c
> > index 565ed67a0430..0d9a39110f29 100644
> > --- a/drivers/clk/zynqmp/clk-gate-zynqmp.c
> > +++ b/drivers/clk/zynqmp/clk-gate-zynqmp.c
> > @@ -41,8 +41,8 @@ static int zynqmp_clk_gate_enable(struct clk_hw *hw)
> >         ret = zynqmp_pm_clock_enable(clk_id);
> >  
> >         if (ret)
> > -               pr_warn_once("%s() clock enabled failed for %s, ret = %d\n",
> > -                            __func__, clk_name, ret);
> > +               pr_warn("%s() clock enable failed for %s (id %d), ret = %d\n",
> > +                       __func__, clk_name, clk_id, ret);
> 
> Can we just remove these prints entirely? The driver that calls
> clk_enable() should be checking the return value and taking proper
> action. What is the user going to do with these messages?
> 

The clocks are handled by a firmware, which checks if the Linux system has the
permission to change certain clocks. The warnings help users to identify an
unexpected configuration of the firmware. However, I guess it would make sense
to change the warnings to pr_debug.

Michael

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-01-14  8:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 14:12 [PATCH] clk: zynqmp: warn always when a clock op fails Michael Tretter
2022-01-12 20:29 ` Stephen Boyd
2022-01-14  8:14   ` Michael Tretter [this message]
2022-01-14 22:20     ` Stephen Boyd

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=20220114081442.GR26783@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=mturquette@baylibre.com \
    --cc=rajan.vaja@xilinx.com \
    --cc=sboyd@kernel.org \
    /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).