* [PATCH] clk: clk-conf: Do not print error messages if EPROBE_DEFER
@ 2017-01-04 10:12 Geert Uytterhoeven
2017-01-04 12:39 ` Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-01-04 10:12 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Geert Uytterhoeven
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>
---
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);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: clk-conf: Do not print error messages if EPROBE_DEFER
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
2017-01-04 20:43 ` Javier Martinez Canillas
2017-01-10 0:09 ` Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2017-01-04 12:39 UTC (permalink / raw)
To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: clk-conf: Do not print error messages if EPROBE_DEFER
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
@ 2017-01-04 20:43 ` Javier Martinez Canillas
2017-01-10 0:09 ` Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2017-01-04 20:43 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Michael Turquette, Stephen Boyd, linux-clk, Linux Kernel
Hello Geert,
On Wed, Jan 4, 2017 at 7:12 AM, Geert Uytterhoeven
<geert+renesas@glider.be> 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: Javier Martinez Canillas <javier@osg.samsung.com>
Best regards,
Javier
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: clk-conf: Do not print error messages if EPROBE_DEFER
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
2017-01-04 20:43 ` Javier Martinez Canillas
@ 2017-01-10 0:09 ` Stephen Boyd
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2017-01-10 0:09 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Michael Turquette, linux-clk, linux-kernel
On 01/04, 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>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-10 0:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-01-04 20:43 ` Javier Martinez Canillas
2017-01-10 0:09 ` Stephen Boyd
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).