linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: imx: Do not print error message in the EPROBE_DEFER case
@ 2014-12-11 21:11 Fabio Estevam
  2014-12-11 23:14 ` Eduardo Valentin
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2014-12-11 21:11 UTC (permalink / raw)
  To: edubezval; +Cc: rui.zhang, linux-pm, Fabio Estevam

From: Fabio Estevam <fabio.estevam@freescale.com>

During imx_thermal probe we have the following log:

[    1.514819] imx_thermal 2000000.aips-bus:tempmon: failed to register cpufreq cooling device: -517
[    1.515064] platform 2000000.aips-bus:tempmon: Driver imx_thermal requests probe deferral

Avoid printing the error message in the EPROBE_DEFER case.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/thermal/imx_thermal.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index bb08d6e..c1188ac 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -513,8 +513,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
 	data->cdev = cpufreq_cooling_register(cpu_present_mask);
 	if (IS_ERR(data->cdev)) {
 		ret = PTR_ERR(data->cdev);
-		dev_err(&pdev->dev,
-			"failed to register cpufreq cooling device: %d\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev,
+				"failed to register cpufreq cooling device: %d\n",
+				ret);
 		return ret;
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] thermal: imx: Do not print error message in the EPROBE_DEFER case
  2014-12-11 21:11 [PATCH] thermal: imx: Do not print error message in the EPROBE_DEFER case Fabio Estevam
@ 2014-12-11 23:14 ` Eduardo Valentin
  2014-12-11 23:18   ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Eduardo Valentin @ 2014-12-11 23:14 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: rui.zhang, linux-pm, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]

Hello Fabio,

On Thu, Dec 11, 2014 at 07:11:40PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> During imx_thermal probe we have the following log:
> 
> [    1.514819] imx_thermal 2000000.aips-bus:tempmon: failed to register cpufreq cooling device: -517
> [    1.515064] platform 2000000.aips-bus:tempmon: Driver imx_thermal requests probe deferral
> 
> Avoid printing the error message in the EPROBE_DEFER case.
> 

Thanks for your patch. But I am queuing a different patch that does a
similar job.

https://git.kernel.org/cgit/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?h=fixes&id=0f1be51c358f740fe5183bd0bcd60076fdfb53d0

Can you please check my -fixes branch? When EPROBE_DEFER happens, we are
now printing a debug message only.

Cheers,

> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/thermal/imx_thermal.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
> index bb08d6e..c1188ac 100644
> --- a/drivers/thermal/imx_thermal.c
> +++ b/drivers/thermal/imx_thermal.c
> @@ -513,8 +513,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
>  	data->cdev = cpufreq_cooling_register(cpu_present_mask);
>  	if (IS_ERR(data->cdev)) {
>  		ret = PTR_ERR(data->cdev);
> -		dev_err(&pdev->dev,
> -			"failed to register cpufreq cooling device: %d\n", ret);
> +		if (ret != -EPROBE_DEFER)
> +			dev_err(&pdev->dev,
> +				"failed to register cpufreq cooling device: %d\n",
> +				ret);
>  		return ret;
>  	}
>  
> -- 
> 1.9.1
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] thermal: imx: Do not print error message in the EPROBE_DEFER case
  2014-12-11 23:14 ` Eduardo Valentin
@ 2014-12-11 23:18   ` Fabio Estevam
  2014-12-12 13:13     ` Eduardo Valentin
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2014-12-11 23:18 UTC (permalink / raw)
  To: Eduardo Valentin; +Cc: rui.zhang, linux-pm@vger.kernel.org, Fabio Estevam

Hi Eduardo,

On Thu, Dec 11, 2014 at 9:14 PM, Eduardo Valentin <edubezval@gmail.com> wrote:

> Thanks for your patch. But I am queuing a different patch that does a
> similar job.
>
> https://git.kernel.org/cgit/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?h=fixes&id=0f1be51c358f740fe5183bd0bcd60076fdfb53d0

I am running linux-next 20141211, which has this commit applied.

> Can you please check my -fixes branch? When EPROBE_DEFER happens, we are
> now printing a debug message only.

On linux-next I am still getting the error, so I still needed my patch.

Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] thermal: imx: Do not print error message in the EPROBE_DEFER case
  2014-12-11 23:18   ` Fabio Estevam
@ 2014-12-12 13:13     ` Eduardo Valentin
  0 siblings, 0 replies; 4+ messages in thread
From: Eduardo Valentin @ 2014-12-12 13:13 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: rui.zhang, linux-pm@vger.kernel.org, Fabio Estevam

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

Fabio,

On Thu, Dec 11, 2014 at 09:18:25PM -0200, Fabio Estevam wrote:
> Hi Eduardo,
> 
> On Thu, Dec 11, 2014 at 9:14 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> 
> > Thanks for your patch. But I am queuing a different patch that does a
> > similar job.
> >
> > https://git.kernel.org/cgit/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?h=fixes&id=0f1be51c358f740fe5183bd0bcd60076fdfb53d0
> 
> I am running linux-next 20141211, which has this commit applied.
> 
> > Can you please check my -fixes branch? When EPROBE_DEFER happens, we are
> > now printing a debug message only.
> 
> On linux-next I am still getting the error, so I still needed my patch.

Understood. I will be queuing it in my -fixes branch.

Thanks!

> 
> Thanks

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-12 13:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11 21:11 [PATCH] thermal: imx: Do not print error message in the EPROBE_DEFER case Fabio Estevam
2014-12-11 23:14 ` Eduardo Valentin
2014-12-11 23:18   ` Fabio Estevam
2014-12-12 13:13     ` Eduardo Valentin

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).