2018-07-17 20:49:41

by Niklas Cassel

[permalink] [raw]
Subject: [PATCH] cpufreq: qcom-kryo: Silently error out on EPROBE_DEFER

If of_nvmem_cell_get() fails due to probe deferal, we shouldn't print an
error message. Just be silent in this case.

Signed-off-by: Niklas Cassel <[email protected]>
---
drivers/cpufreq/qcom-cpufreq-kryo.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
index 29389accf3e9..b8d1e6875f16 100644
--- a/drivers/cpufreq/qcom-cpufreq-kryo.c
+++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
@@ -109,8 +109,9 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
speedbin_nvmem = of_nvmem_cell_get(np, NULL);
of_node_put(np);
if (IS_ERR(speedbin_nvmem)) {
- dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
- PTR_ERR(speedbin_nvmem));
+ if (PTR_ERR(speedbin_nvmem) != -EPROBE_DEFER)
+ dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
+ PTR_ERR(speedbin_nvmem));
return PTR_ERR(speedbin_nvmem);
}

--
2.17.1



2018-07-18 04:45:14

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH] cpufreq: qcom-kryo: Silently error out on EPROBE_DEFER

On 17-07-18, 22:48, Niklas Cassel wrote:
> If of_nvmem_cell_get() fails due to probe deferal, we shouldn't print an
> error message. Just be silent in this case.
>
> Signed-off-by: Niklas Cassel <[email protected]>
> ---
> drivers/cpufreq/qcom-cpufreq-kryo.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
> index 29389accf3e9..b8d1e6875f16 100644
> --- a/drivers/cpufreq/qcom-cpufreq-kryo.c
> +++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
> @@ -109,8 +109,9 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
> speedbin_nvmem = of_nvmem_cell_get(np, NULL);
> of_node_put(np);
> if (IS_ERR(speedbin_nvmem)) {
> - dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
> - PTR_ERR(speedbin_nvmem));
> + if (PTR_ERR(speedbin_nvmem) != -EPROBE_DEFER)
> + dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
> + PTR_ERR(speedbin_nvmem));
> return PTR_ERR(speedbin_nvmem);
> }

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2018-07-18 10:22:20

by Amit Kucheria

[permalink] [raw]
Subject: Re: [PATCH] cpufreq: qcom-kryo: Silently error out on EPROBE_DEFER

On Wed, Jul 18, 2018 at 2:18 AM, Niklas Cassel <[email protected]> wrote:
> If of_nvmem_cell_get() fails due to probe deferal, we shouldn't print an
> error message. Just be silent in this case.
>
> Signed-off-by: Niklas Cassel <[email protected]>

Reviewed-by: Amit Kucheria <[email protected]>

> ---
> drivers/cpufreq/qcom-cpufreq-kryo.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
> index 29389accf3e9..b8d1e6875f16 100644
> --- a/drivers/cpufreq/qcom-cpufreq-kryo.c
> +++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
> @@ -109,8 +109,9 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
> speedbin_nvmem = of_nvmem_cell_get(np, NULL);
> of_node_put(np);
> if (IS_ERR(speedbin_nvmem)) {
> - dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
> - PTR_ERR(speedbin_nvmem));
> + if (PTR_ERR(speedbin_nvmem) != -EPROBE_DEFER)
> + dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
> + PTR_ERR(speedbin_nvmem));
> return PTR_ERR(speedbin_nvmem);
> }
>
> --
> 2.17.1
>

2018-07-19 10:48:11

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] cpufreq: qcom-kryo: Silently error out on EPROBE_DEFER

On Wednesday, July 18, 2018 6:44:22 AM CEST Viresh Kumar wrote:
> On 17-07-18, 22:48, Niklas Cassel wrote:
> > If of_nvmem_cell_get() fails due to probe deferal, we shouldn't print an
> > error message. Just be silent in this case.
> >
> > Signed-off-by: Niklas Cassel <[email protected]>
> > ---
> > drivers/cpufreq/qcom-cpufreq-kryo.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b/drivers/cpufreq/qcom-cpufreq-kryo.c
> > index 29389accf3e9..b8d1e6875f16 100644
> > --- a/drivers/cpufreq/qcom-cpufreq-kryo.c
> > +++ b/drivers/cpufreq/qcom-cpufreq-kryo.c
> > @@ -109,8 +109,9 @@ static int qcom_cpufreq_kryo_probe(struct platform_device *pdev)
> > speedbin_nvmem = of_nvmem_cell_get(np, NULL);
> > of_node_put(np);
> > if (IS_ERR(speedbin_nvmem)) {
> > - dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
> > - PTR_ERR(speedbin_nvmem));
> > + if (PTR_ERR(speedbin_nvmem) != -EPROBE_DEFER)
> > + dev_err(cpu_dev, "Could not get nvmem cell: %ld\n",
> > + PTR_ERR(speedbin_nvmem));
> > return PTR_ERR(speedbin_nvmem);
> > }
>
> Acked-by: Viresh Kumar <[email protected]>
>
>

Applied, thanks!