linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs()
@ 2023-03-18 14:44 Yangtao Li
  2023-03-18 14:44 ` [PATCH 2/9] thermal/drivers/sun8i: remove redundant msg in sun8i_ths_register() Yangtao Li
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui
  Cc: Yangtao Li, linux-pm, linux-kernel

Ensure that all error handling branches print error information. In this
way, when this function fails, the upper-layer functions can directly
return an error code without missing debugging information. Otherwise,
the error message will be printed redundantly or missing.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/thermal_hwmon.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/thermal_hwmon.c b/drivers/thermal/thermal_hwmon.c
index c59db17dddd6..ae87401b1a1d 100644
--- a/drivers/thermal/thermal_hwmon.c
+++ b/drivers/thermal/thermal_hwmon.c
@@ -271,11 +271,15 @@ int devm_thermal_add_hwmon_sysfs(struct device *dev, struct thermal_zone_device
 
 	ptr = devres_alloc(devm_thermal_hwmon_release, sizeof(*ptr),
 			   GFP_KERNEL);
-	if (!ptr)
+	if (!ptr) {
+		dev_err(dev, "Failed to allocate device resource data\n");
 		return -ENOMEM;
+	}
 
 	ret = thermal_add_hwmon_sysfs(tz);
 	if (ret) {
+		dev_err(dev, "Failed to add hwmon sysfs attributes\n");
+
 		devres_free(ptr);
 		return ret;
 	}
-- 
2.35.1


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

* [PATCH 2/9] thermal/drivers/sun8i: remove redundant msg in sun8i_ths_register()
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  2023-03-18 14:44 ` [PATCH 3/9] thermal/drivers/amlogic: remove redundant msg in amlogic_thermal_probe() Yangtao Li
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Vasily Khoruzhick, Yangtao Li, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland
  Cc: Yangtao Li, linux-pm, linux-arm-kernel, linux-sunxi, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/sun8i_thermal.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 793ddce72132..066f9fed9b86 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -475,9 +475,7 @@ static int sun8i_ths_register(struct ths_device *tmdev)
 		if (IS_ERR(tmdev->sensor[i].tzd))
 			return PTR_ERR(tmdev->sensor[i].tzd);
 
-		if (devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd))
-			dev_warn(tmdev->dev,
-				 "Failed to add hwmon sysfs attributes\n");
+		devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd);
 	}
 
 	return 0;
-- 
2.35.1


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

* [PATCH 3/9] thermal/drivers/amlogic: remove redundant msg in amlogic_thermal_probe()
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
  2023-03-18 14:44 ` [PATCH 2/9] thermal/drivers/sun8i: remove redundant msg in sun8i_ths_register() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  2023-03-18 19:48   ` Martin Blumenstingl
  2023-03-18 14:44 ` [PATCH 4/9] thermal/drivers/imx: remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe() Yangtao Li
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui
  Cc: Yangtao Li, linux-pm, linux-amlogic, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/amlogic_thermal.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/amlogic_thermal.c b/drivers/thermal/amlogic_thermal.c
index 4bf36386462f..16e52e26a5d7 100644
--- a/drivers/thermal/amlogic_thermal.c
+++ b/drivers/thermal/amlogic_thermal.c
@@ -285,8 +285,7 @@ static int amlogic_thermal_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	if (devm_thermal_add_hwmon_sysfs(&pdev->dev, pdata->tzd))
-		dev_warn(&pdev->dev, "Failed to add hwmon sysfs attributes\n");
+	devm_thermal_add_hwmon_sysfs(&pdev->dev, pdata->tzd);
 
 	ret = amlogic_thermal_initialize(pdata);
 	if (ret)
-- 
2.35.1


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

* [PATCH 4/9] thermal/drivers/imx: remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe()
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
  2023-03-18 14:44 ` [PATCH 2/9] thermal/drivers/sun8i: remove redundant msg in sun8i_ths_register() Yangtao Li
  2023-03-18 14:44 ` [PATCH 3/9] thermal/drivers/amlogic: remove redundant msg in amlogic_thermal_probe() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  2023-03-18 14:44 ` [PATCH 5/9] drivers/thermal/k3: remove redundant msg in k3_bandgap_probe() Yangtao Li
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team
  Cc: Yangtao Li, linux-pm, linux-arm-kernel, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/imx8mm_thermal.c | 3 +--
 drivers/thermal/imx_sc_thermal.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index e0de6ac49469..d837e2f96397 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -343,8 +343,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
 		}
 		tmu->sensors[i].hw_id = i;
 
-		if (devm_thermal_add_hwmon_sysfs(&pdev->dev, tmu->sensors[i].tzd))
-			dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
+		devm_thermal_add_hwmon_sysfs(&pdev->dev, tmu->sensors[i].tzd);
 	}
 
 	platform_set_drvdata(pdev, tmu);
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index 839bb9958f60..8d6b4ef23746 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -116,8 +116,7 @@ static int imx_sc_thermal_probe(struct platform_device *pdev)
 			return ret;
 		}
 
-		if (devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd))
-			dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
+		devm_thermal_add_hwmon_sysfs(&pdev->dev, sensor->tzd);
 	}
 
 	return 0;
-- 
2.35.1


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

* [PATCH 5/9] drivers/thermal/k3: remove redundant msg in k3_bandgap_probe()
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
                   ` (2 preceding siblings ...)
  2023-03-18 14:44 ` [PATCH 4/9] thermal/drivers/imx: remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  2023-03-18 14:44 ` [PATCH 6/9] thermal/drivers/tegra: remove redundant msg in tegra_tsensor_register_channel() Yangtao Li
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui
  Cc: Yangtao Li, linux-pm, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/k3_bandgap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c
index 791210458606..1c3e590157ec 100644
--- a/drivers/thermal/k3_bandgap.c
+++ b/drivers/thermal/k3_bandgap.c
@@ -222,8 +222,7 @@ static int k3_bandgap_probe(struct platform_device *pdev)
 			goto err_alloc;
 		}
 
-		if (devm_thermal_add_hwmon_sysfs(dev, data[id].tzd))
-			dev_warn(dev, "Failed to add hwmon sysfs attributes\n");
+		devm_thermal_add_hwmon_sysfs(dev, data[id].tzd);
 	}
 
 	platform_set_drvdata(pdev, bgp);
-- 
2.35.1


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

* [PATCH 6/9] thermal/drivers/tegra: remove redundant msg in tegra_tsensor_register_channel()
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
                   ` (3 preceding siblings ...)
  2023-03-18 14:44 ` [PATCH 5/9] drivers/thermal/k3: remove redundant msg in k3_bandgap_probe() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  2023-04-05 12:13   ` Thierry Reding
  2023-03-18 14:44 ` [PATCH 7/9] thermal/drivers/qoriq: remove redundant msg in qoriq_tmu_register_tmu_zone() Yangtao Li
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Thierry Reding, Jonathan Hunter
  Cc: Yangtao Li, linux-pm, linux-tegra, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/tegra/tegra30-tsensor.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c
index cb584a5735ed..c243e9d76d3c 100644
--- a/drivers/thermal/tegra/tegra30-tsensor.c
+++ b/drivers/thermal/tegra/tegra30-tsensor.c
@@ -523,8 +523,7 @@ static int tegra_tsensor_register_channel(struct tegra_tsensor *ts,
 		return 0;
 	}
 
-	if (devm_thermal_add_hwmon_sysfs(ts->dev, tsc->tzd))
-		dev_warn(ts->dev, "failed to add hwmon sysfs attributes\n");
+	devm_thermal_add_hwmon_sysfs(ts->dev, tsc->tzd);
 
 	return 0;
 }
-- 
2.35.1


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

* [PATCH 7/9] thermal/drivers/qoriq: remove redundant msg in qoriq_tmu_register_tmu_zone()
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
                   ` (4 preceding siblings ...)
  2023-03-18 14:44 ` [PATCH 6/9] thermal/drivers/tegra: remove redundant msg in tegra_tsensor_register_channel() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  2023-03-18 14:44 ` [PATCH 8/9] thermal/drivers/ti-soc: remove redundant msg in ti_thermal_expose_sensor() Yangtao Li
  2023-03-18 14:44 ` [PATCH 9/9] thermal/drivers/qcom: remove redundant msg Yangtao Li
  7 siblings, 0 replies; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui
  Cc: Yangtao Li, linux-pm, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/qoriq_thermal.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index e58756323457..61b68034a82e 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -157,10 +157,7 @@ static int qoriq_tmu_register_tmu_zone(struct device *dev,
 			return ret;
 		}
 
-		if (devm_thermal_add_hwmon_sysfs(dev, tzd))
-			dev_warn(dev,
-				 "Failed to add hwmon sysfs attributes\n");
-
+		devm_thermal_add_hwmon_sysfs(dev, tzd);
 	}
 
 	return 0;
-- 
2.35.1


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

* [PATCH 8/9] thermal/drivers/ti-soc: remove redundant msg in ti_thermal_expose_sensor()
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
                   ` (5 preceding siblings ...)
  2023-03-18 14:44 ` [PATCH 7/9] thermal/drivers/qoriq: remove redundant msg in qoriq_tmu_register_tmu_zone() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  2023-03-18 14:44 ` [PATCH 9/9] thermal/drivers/qcom: remove redundant msg Yangtao Li
  7 siblings, 0 replies; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Eduardo Valentin, Keerthy, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui
  Cc: Yangtao Li, linux-pm, linux-omap, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 0c8914017c18..e39091f999d9 100644
--- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
+++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
@@ -182,8 +182,7 @@ int ti_thermal_expose_sensor(struct ti_bandgap *bgp, int id,
 	ti_bandgap_set_sensor_data(bgp, id, data);
 	ti_bandgap_write_update_interval(bgp, data->sensor_id, interval);
 
-	if (devm_thermal_add_hwmon_sysfs(bgp->dev, data->ti_thermal))
-		dev_warn(bgp->dev, "failed to add hwmon sysfs attributes\n");
+	devm_thermal_add_hwmon_sysfs(bgp->dev, data->ti_thermal);
 
 	return 0;
 }
-- 
2.35.1


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

* [PATCH 9/9] thermal/drivers/qcom: remove redundant msg
  2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
                   ` (6 preceding siblings ...)
  2023-03-18 14:44 ` [PATCH 8/9] thermal/drivers/ti-soc: remove redundant msg in ti_thermal_expose_sensor() Yangtao Li
@ 2023-03-18 14:44 ` Yangtao Li
  7 siblings, 0 replies; 11+ messages in thread
From: Yangtao Li @ 2023-03-18 14:44 UTC (permalink / raw)
  To: Amit Kucheria, Thara Gopinath, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Rafael J. Wysocki, Daniel Lezcano, Zhang Rui
  Cc: Yangtao Li, linux-arm-msm, linux-pm, linux-kernel

The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/qcom/qcom-spmi-adc-tm5.c    | 4 +---
 drivers/thermal/qcom/qcom-spmi-temp-alarm.c | 4 +---
 drivers/thermal/qcom/tsens.c                | 4 +---
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
index 5749149ae2e4..5ddc39b2be32 100644
--- a/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
+++ b/drivers/thermal/qcom/qcom-spmi-adc-tm5.c
@@ -689,9 +689,7 @@ static int adc_tm5_register_tzd(struct adc_tm5_chip *adc_tm)
 			return PTR_ERR(tzd);
 		}
 		adc_tm->channels[i].tzd = tzd;
-		if (devm_thermal_add_hwmon_sysfs(adc_tm->dev, tzd))
-			dev_warn(adc_tm->dev,
-				 "Failed to add hwmon sysfs attributes\n");
+		devm_thermal_add_hwmon_sysfs(adc_tm->dev, tzd);
 	}
 
 	return 0;
diff --git a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
index 0f88e98428ac..2a3b3e21260f 100644
--- a/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
+++ b/drivers/thermal/qcom/qcom-spmi-temp-alarm.c
@@ -459,9 +459,7 @@ static int qpnp_tm_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	if (devm_thermal_add_hwmon_sysfs(&pdev->dev, chip->tz_dev))
-		dev_warn(&pdev->dev,
-			 "Failed to add hwmon sysfs attributes\n");
+	devm_thermal_add_hwmon_sysfs(&pdev->dev, chip->tz_dev);
 
 	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, qpnp_tm_isr,
 					IRQF_ONESHOT, node->name, chip);
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index d3218127e617..f99b0539468b 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -1189,9 +1189,7 @@ static int tsens_register(struct tsens_priv *priv)
 		if (priv->ops->enable)
 			priv->ops->enable(priv, i);
 
-		if (devm_thermal_add_hwmon_sysfs(priv->dev, tzd))
-			dev_warn(priv->dev,
-				 "Failed to add hwmon sysfs attributes\n");
+		devm_thermal_add_hwmon_sysfs(priv->dev, tzd);
 	}
 
 	/* VER_0 require to set MIN and MAX THRESH
-- 
2.35.1


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

* Re: [PATCH 3/9] thermal/drivers/amlogic: remove redundant msg in amlogic_thermal_probe()
  2023-03-18 14:44 ` [PATCH 3/9] thermal/drivers/amlogic: remove redundant msg in amlogic_thermal_probe() Yangtao Li
@ 2023-03-18 19:48   ` Martin Blumenstingl
  0 siblings, 0 replies; 11+ messages in thread
From: Martin Blumenstingl @ 2023-03-18 19:48 UTC (permalink / raw)
  To: Yangtao Li
  Cc: Guillaume La Roque, Rafael J. Wysocki, Daniel Lezcano,
	Amit Kucheria, Zhang Rui, linux-pm, linux-amlogic, linux-kernel

On Sat, Mar 18, 2023 at 3:45 PM Yangtao Li <frank.li@vivo.com> wrote:
>
> The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
> print error information.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Assuming this is applied after/together with the first patch from this series:
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

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

* Re: [PATCH 6/9] thermal/drivers/tegra: remove redundant msg in tegra_tsensor_register_channel()
  2023-03-18 14:44 ` [PATCH 6/9] thermal/drivers/tegra: remove redundant msg in tegra_tsensor_register_channel() Yangtao Li
@ 2023-04-05 12:13   ` Thierry Reding
  0 siblings, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2023-04-05 12:13 UTC (permalink / raw)
  To: Yangtao Li
  Cc: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Jonathan Hunter, linux-pm, linux-tegra, linux-kernel

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

On Sat, Mar 18, 2023 at 10:44:09PM +0800, Yangtao Li wrote:
> The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
> print error information.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/thermal/tegra/tegra30-tsensor.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c
> index cb584a5735ed..c243e9d76d3c 100644
> --- a/drivers/thermal/tegra/tegra30-tsensor.c
> +++ b/drivers/thermal/tegra/tegra30-tsensor.c
> @@ -523,8 +523,7 @@ static int tegra_tsensor_register_channel(struct tegra_tsensor *ts,
>  		return 0;
>  	}
>  
> -	if (devm_thermal_add_hwmon_sysfs(ts->dev, tsc->tzd))
> -		dev_warn(ts->dev, "failed to add hwmon sysfs attributes\n");
> +	devm_thermal_add_hwmon_sysfs(ts->dev, tsc->tzd);

I don't see any error messages output by devm_thermal_add_hwmon_sysfs()
nor any of the functions that it calls. Did I miss something?

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2023-04-05 12:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-18 14:44 [PATCH 1/9] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() Yangtao Li
2023-03-18 14:44 ` [PATCH 2/9] thermal/drivers/sun8i: remove redundant msg in sun8i_ths_register() Yangtao Li
2023-03-18 14:44 ` [PATCH 3/9] thermal/drivers/amlogic: remove redundant msg in amlogic_thermal_probe() Yangtao Li
2023-03-18 19:48   ` Martin Blumenstingl
2023-03-18 14:44 ` [PATCH 4/9] thermal/drivers/imx: remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe() Yangtao Li
2023-03-18 14:44 ` [PATCH 5/9] drivers/thermal/k3: remove redundant msg in k3_bandgap_probe() Yangtao Li
2023-03-18 14:44 ` [PATCH 6/9] thermal/drivers/tegra: remove redundant msg in tegra_tsensor_register_channel() Yangtao Li
2023-04-05 12:13   ` Thierry Reding
2023-03-18 14:44 ` [PATCH 7/9] thermal/drivers/qoriq: remove redundant msg in qoriq_tmu_register_tmu_zone() Yangtao Li
2023-03-18 14:44 ` [PATCH 8/9] thermal/drivers/ti-soc: remove redundant msg in ti_thermal_expose_sensor() Yangtao Li
2023-03-18 14:44 ` [PATCH 9/9] thermal/drivers/qcom: remove redundant msg Yangtao Li

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