All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
@ 2022-11-02 15:26 Johan Hovold
  2022-11-02 16:10 ` Andrew Halaney
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Johan Hovold @ 2022-11-02 15:26 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki,
	Daniel Lezcano, Zhang Rui, linux-pm, linux-arm-msm, linux-kernel,
	Johan Hovold

Drivers should not be logging errors on probe deferral. Switch to using
dev_err_probe() to log failures when parsing the devicetree to avoid
errors like:

	qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517

when a channel is not yet available.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index a3310bf061cb..c70615d2d771 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -1031,10 +1031,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
 		return irq;
 
 	ret = adc_tm5_get_dt_data(adc_tm, node);
-	if (ret) {
-		dev_err(dev, "get dt data failed: %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "get dt data failed\n");
 
 	ret = adc_tm->data->init(adc_tm);
 	if (ret) {
-- 
2.37.3


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

* Re: [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
  2022-11-02 15:26 [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Johan Hovold
@ 2022-11-02 16:10 ` Andrew Halaney
  2022-11-02 16:23 ` Manivannan Sadhasivam
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Andrew Halaney @ 2022-11-02 16:10 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
	linux-pm, linux-arm-msm, linux-kernel

On Wed, Nov 02, 2022 at 04:26:30PM +0100, Johan Hovold wrote:
> Drivers should not be logging errors on probe deferral. Switch to using
> dev_err_probe() to log failures when parsing the devicetree to avoid
> errors like:
> 
> 	qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517
> 
> when a channel is not yet available.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Andrew Halaney <ahalaney@redhat.com>

> ---
>  drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> index a3310bf061cb..c70615d2d771 100644
> --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> @@ -1031,10 +1031,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
>  		return irq;
>  
>  	ret = adc_tm5_get_dt_data(adc_tm, node);
> -	if (ret) {
> -		dev_err(dev, "get dt data failed: %d\n", ret);
> -		return ret;
> -	}
> +	if (ret)
> +		return dev_err_probe(dev, ret, "get dt data failed\n");
>  
>  	ret = adc_tm->data->init(adc_tm);
>  	if (ret) {
> -- 
> 2.37.3
> 


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

* Re: [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
  2022-11-02 15:26 [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Johan Hovold
  2022-11-02 16:10 ` Andrew Halaney
@ 2022-11-02 16:23 ` Manivannan Sadhasivam
  2022-11-30  6:58 ` Johan Hovold
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Manivannan Sadhasivam @ 2022-11-02 16:23 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui,
	linux-pm, linux-arm-msm, linux-kernel

On Wed, Nov 02, 2022 at 04:26:30PM +0100, Johan Hovold wrote:
> Drivers should not be logging errors on probe deferral. Switch to using
> dev_err_probe() to log failures when parsing the devicetree to avoid
> errors like:
> 
> 	qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517
> 
> when a channel is not yet available.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

I did send a patch earlier for fixing this same issue but I did not use
dev_err_probe(). So yours is better.

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>

Thanks,
Mani

> ---
>  drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> index a3310bf061cb..c70615d2d771 100644
> --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> @@ -1031,10 +1031,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
>  		return irq;
>  
>  	ret = adc_tm5_get_dt_data(adc_tm, node);
> -	if (ret) {
> -		dev_err(dev, "get dt data failed: %d\n", ret);
> -		return ret;
> -	}
> +	if (ret)
> +		return dev_err_probe(dev, ret, "get dt data failed\n");
>  
>  	ret = adc_tm->data->init(adc_tm);
>  	if (ret) {
> -- 
> 2.37.3
> 

-- 
மணிவண்ணன் சதாசிவம்

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

* Re: [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
  2022-11-02 15:26 [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Johan Hovold
  2022-11-02 16:10 ` Andrew Halaney
  2022-11-02 16:23 ` Manivannan Sadhasivam
@ 2022-11-30  6:58 ` Johan Hovold
  2022-12-04 16:35 ` Daniel Lezcano
  2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Johan Hovold
  4 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2022-11-30  6:58 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Rafael J. Wysocki, Zhang Rui, linux-pm,
	linux-arm-msm, linux-kernel

On Wed, Nov 02, 2022 at 04:26:30PM +0100, Johan Hovold wrote:
> Drivers should not be logging errors on probe deferral. Switch to using
> dev_err_probe() to log failures when parsing the devicetree to avoid
> errors like:
> 
> 	qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517
> 
> when a channel is not yet available.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> index a3310bf061cb..c70615d2d771 100644
> --- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> +++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
> @@ -1031,10 +1031,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
>  		return irq;
>  
>  	ret = adc_tm5_get_dt_data(adc_tm, node);
> -	if (ret) {
> -		dev_err(dev, "get dt data failed: %d\n", ret);
> -		return ret;
> -	}
> +	if (ret)
> +		return dev_err_probe(dev, ret, "get dt data failed\n");
>  
>  	ret = adc_tm->data->init(adc_tm);
>  	if (ret) {

Daniel, I noticed this one hasn't been picked up yet (at least it's not
in linux-next). Is this something you can do?

Johan

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

* Re: [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
  2022-11-02 15:26 [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Johan Hovold
                   ` (2 preceding siblings ...)
  2022-11-30  6:58 ` Johan Hovold
@ 2022-12-04 16:35 ` Daniel Lezcano
  2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Johan Hovold
  4 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2022-12-04 16:35 UTC (permalink / raw)
  To: Johan Hovold, Amit Kucheria, Thara Gopinath
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rafael J. Wysocki,
	Zhang Rui, linux-pm, linux-arm-msm, linux-kernel

On 02/11/2022 16:26, Johan Hovold wrote:
> Drivers should not be logging errors on probe deferral. Switch to using
> dev_err_probe() to log failures when parsing the devicetree to avoid
> errors like:
> 
> 	qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517
> 
> when a channel is not yet available.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---

Applied, thanks

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


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

* [thermal: thermal/next] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message
  2022-11-02 15:26 [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Johan Hovold
                   ` (3 preceding siblings ...)
  2022-12-04 16:35 ` Daniel Lezcano
@ 2022-12-09 15:26 ` thermal-bot for Johan Hovold
  4 siblings, 0 replies; 6+ messages in thread
From: thermal-bot for Johan Hovold @ 2022-12-09 15:26 UTC (permalink / raw)
  To: linux-pm
  Cc: Johan Hovold, Manivannan Sadhasivam, Andrew Halaney,
	Daniel Lezcano, rui.zhang, daniel.lezcano, amitk

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     807efb7102e8d22b61cd400495f9478a110badd2
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//807efb7102e8d22b61cd400495f9478a110badd2
Author:        Johan Hovold <johan+linaro@kernel.org>
AuthorDate:    Wed, 02 Nov 2022 16:26:30 +01:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:44 +01:00

thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message

Drivers should not be logging errors on probe deferral. Switch to using
dev_err_probe() to log failures when parsing the devicetree to avoid
errors like:

	qcom-spmi-adc-tm5 c440000.spmi:pmic@0:adc-tm@3400: get dt data failed: -517

when a channel is not yet available.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Link: https://lore.kernel.org/r/20221102152630.696-1-johan+linaro@kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index 1b2c43e..88462a4 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -1030,10 +1030,8 @@ static int adc_tm5_probe(struct platform_device *pdev)
 		return irq;
 
 	ret = adc_tm5_get_dt_data(adc_tm, node);
-	if (ret) {
-		dev_err(dev, "get dt data failed: %d\n", ret);
-		return ret;
-	}
+	if (ret)
+		return dev_err_probe(dev, ret, "get dt data failed\n");
 
 	ret = adc_tm->data->init(adc_tm);
 	if (ret) {

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

end of thread, other threads:[~2022-12-09 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 15:26 [PATCH] thermal: qcom-spmi-adc-tm5: suppress probe-deferral error message Johan Hovold
2022-11-02 16:10 ` Andrew Halaney
2022-11-02 16:23 ` Manivannan Sadhasivam
2022-11-30  6:58 ` Johan Hovold
2022-12-04 16:35 ` Daniel Lezcano
2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Johan Hovold

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.