From: Marek Vasut <marek.vasut@gmail.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] clk: clk-conf: Do not print error messages if EPROBE_DEFER
Date: Wed, 4 Jan 2017 13:39:38 +0100 [thread overview]
Message-ID: <b8883314-c166-e904-dcb2-dc62d7200997@gmail.com> (raw)
In-Reply-To: <1483524753-32213-1-git-send-email-geert+renesas@glider.be>
On 01/04/2017 11:12 AM, Geert Uytterhoeven wrote:
> EPROBE_DEFER is not an error, hence printing an error message like
>
> clk: couldn't get clock 0 for /soc/display@feb00000
>
> may confuse the user.
>
> Suppress error messages in case of probe deferral to fix this.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
> ---
> drivers/clk/clk-conf.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/clk/clk-conf.c b/drivers/clk/clk-conf.c
> index 674785d968a3e1c5..e0e02a6e59009e7a 100644
> --- a/drivers/clk/clk-conf.c
> +++ b/drivers/clk/clk-conf.c
> @@ -40,8 +40,9 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
> return 0;
> pclk = of_clk_get_from_provider(&clkspec);
> if (IS_ERR(pclk)) {
> - pr_warn("clk: couldn't get parent clock %d for %s\n",
> - index, node->full_name);
> + if (PTR_ERR(pclk) != -EPROBE_DEFER)
> + pr_warn("clk: couldn't get parent clock %d for %s\n",
> + index, node->full_name);
> return PTR_ERR(pclk);
> }
>
> @@ -55,8 +56,9 @@ static int __set_clk_parents(struct device_node *node, bool clk_supplier)
> }
> clk = of_clk_get_from_provider(&clkspec);
> if (IS_ERR(clk)) {
> - pr_warn("clk: couldn't get assigned clock %d for %s\n",
> - index, node->full_name);
> + if (PTR_ERR(clk) != -EPROBE_DEFER)
> + pr_warn("clk: couldn't get assigned clock %d for %s\n",
> + index, node->full_name);
> rc = PTR_ERR(clk);
> goto err;
> }
> @@ -99,8 +101,9 @@ static int __set_clk_rates(struct device_node *node, bool clk_supplier)
>
> clk = of_clk_get_from_provider(&clkspec);
> if (IS_ERR(clk)) {
> - pr_warn("clk: couldn't get clock %d for %s\n",
> - index, node->full_name);
> + if (PTR_ERR(clk) != -EPROBE_DEFER)
> + pr_warn("clk: couldn't get clock %d for %s\n",
> + index, node->full_name);
> return PTR_ERR(clk);
> }
>
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2017-01-04 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 10:12 [PATCH] clk: clk-conf: Do not print error messages if EPROBE_DEFER Geert Uytterhoeven
2017-01-04 12:39 ` Marek Vasut [this message]
2017-01-04 20:43 ` Javier Martinez Canillas
2017-01-10 0:09 ` 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=b8883314-c166-e904-dcb2-dc62d7200997@gmail.com \
--to=marek.vasut@gmail.com \
--cc=geert+renesas@glider.be \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.