Re: [PATCH] mmc: tegra: suppress errors when probe is deferred
On 17 August 2017 at 13:52, Timo Alhowrote: > Don't print error message when clk_get() returns -EPROBE_DEFER. On > recent Tegra chips (t186 onwards), the clocks are provided by > auxiliary microprocessor (bpmp) and until the driver for it is probed > clocks are not available. > > While at it, change the real error message more meaningful. > > Signed-off-by: Timo Alho > --- > drivers/mmc/host/sdhci-tegra.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c > index f668a6f..cdde9ff 100644 > --- a/drivers/mmc/host/sdhci-tegra.c > +++ b/drivers/mmc/host/sdhci-tegra.c > @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device > *pdev) > > clk = devm_clk_get(mmc_dev(host->mmc), NULL); > if (IS_ERR(clk)) { > - dev_err(mmc_dev(host->mmc), "clk err\n"); > rc = PTR_ERR(clk); > + if (rc != -EPROBE_DEFER) > + dev_err(>dev, > + "failed to get controller clock: %d\n", rc); There is no need to print an error in any case, as the common clk framework deals with relevant error printing. > goto err_clk_get; > } > clk_prepare_enable(clk); > -- > 2.7.4 > Kind regards Uffe
Re: [PATCH] mmc: tegra: suppress errors when probe is deferred
On 17 August 2017 at 13:52, Timo Alho wrote: > Don't print error message when clk_get() returns -EPROBE_DEFER. On > recent Tegra chips (t186 onwards), the clocks are provided by > auxiliary microprocessor (bpmp) and until the driver for it is probed > clocks are not available. > > While at it, change the real error message more meaningful. > > Signed-off-by: Timo Alho > --- > drivers/mmc/host/sdhci-tegra.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c > index f668a6f..cdde9ff 100644 > --- a/drivers/mmc/host/sdhci-tegra.c > +++ b/drivers/mmc/host/sdhci-tegra.c > @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device > *pdev) > > clk = devm_clk_get(mmc_dev(host->mmc), NULL); > if (IS_ERR(clk)) { > - dev_err(mmc_dev(host->mmc), "clk err\n"); > rc = PTR_ERR(clk); > + if (rc != -EPROBE_DEFER) > + dev_err(>dev, > + "failed to get controller clock: %d\n", rc); There is no need to print an error in any case, as the common clk framework deals with relevant error printing. > goto err_clk_get; > } > clk_prepare_enable(clk); > -- > 2.7.4 > Kind regards Uffe
Re: [PATCH] mmc: tegra: suppress errors when probe is deferred
On 17/08/17 14:52, Timo Alho wrote: > Don't print error message when clk_get() returns -EPROBE_DEFER. On > recent Tegra chips (t186 onwards), the clocks are provided by > auxiliary microprocessor (bpmp) and until the driver for it is probed > clocks are not available. > > While at it, change the real error message more meaningful. > > Signed-off-by: Timo AlhoOne comment below, nevertheless: Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci-tegra.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c > index f668a6f..cdde9ff 100644 > --- a/drivers/mmc/host/sdhci-tegra.c > +++ b/drivers/mmc/host/sdhci-tegra.c > @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device > *pdev) > > clk = devm_clk_get(mmc_dev(host->mmc), NULL); > if (IS_ERR(clk)) { > - dev_err(mmc_dev(host->mmc), "clk err\n"); > rc = PTR_ERR(clk); > + if (rc != -EPROBE_DEFER) > + dev_err(>dev, Looks a bit weird sometimes using mmc_dev(host->mmc) and sometimes >dev. > + "failed to get controller clock: %d\n", rc); > goto err_clk_get; > } > clk_prepare_enable(clk); >
Re: [PATCH] mmc: tegra: suppress errors when probe is deferred
On 17/08/17 14:52, Timo Alho wrote: > Don't print error message when clk_get() returns -EPROBE_DEFER. On > recent Tegra chips (t186 onwards), the clocks are provided by > auxiliary microprocessor (bpmp) and until the driver for it is probed > clocks are not available. > > While at it, change the real error message more meaningful. > > Signed-off-by: Timo Alho One comment below, nevertheless: Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci-tegra.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c > index f668a6f..cdde9ff 100644 > --- a/drivers/mmc/host/sdhci-tegra.c > +++ b/drivers/mmc/host/sdhci-tegra.c > @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device > *pdev) > > clk = devm_clk_get(mmc_dev(host->mmc), NULL); > if (IS_ERR(clk)) { > - dev_err(mmc_dev(host->mmc), "clk err\n"); > rc = PTR_ERR(clk); > + if (rc != -EPROBE_DEFER) > + dev_err(>dev, Looks a bit weird sometimes using mmc_dev(host->mmc) and sometimes >dev. > + "failed to get controller clock: %d\n", rc); > goto err_clk_get; > } > clk_prepare_enable(clk); >
[PATCH] mmc: tegra: suppress errors when probe is deferred
Don't print error message when clk_get() returns -EPROBE_DEFER. On recent Tegra chips (t186 onwards), the clocks are provided by auxiliary microprocessor (bpmp) and until the driver for it is probed clocks are not available. While at it, change the real error message more meaningful. Signed-off-by: Timo Alho--- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index f668a6f..cdde9ff 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev) clk = devm_clk_get(mmc_dev(host->mmc), NULL); if (IS_ERR(clk)) { - dev_err(mmc_dev(host->mmc), "clk err\n"); rc = PTR_ERR(clk); + if (rc != -EPROBE_DEFER) + dev_err(>dev, + "failed to get controller clock: %d\n", rc); goto err_clk_get; } clk_prepare_enable(clk); -- 2.7.4
[PATCH] mmc: tegra: suppress errors when probe is deferred
Don't print error message when clk_get() returns -EPROBE_DEFER. On recent Tegra chips (t186 onwards), the clocks are provided by auxiliary microprocessor (bpmp) and until the driver for it is probed clocks are not available. While at it, change the real error message more meaningful. Signed-off-by: Timo Alho --- drivers/mmc/host/sdhci-tegra.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index f668a6f..cdde9ff 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -501,8 +501,10 @@ static int sdhci_tegra_probe(struct platform_device *pdev) clk = devm_clk_get(mmc_dev(host->mmc), NULL); if (IS_ERR(clk)) { - dev_err(mmc_dev(host->mmc), "clk err\n"); rc = PTR_ERR(clk); + if (rc != -EPROBE_DEFER) + dev_err(>dev, + "failed to get controller clock: %d\n", rc); goto err_clk_get; } clk_prepare_enable(clk); -- 2.7.4