diff mbox series

[v3,08/12] thermal/drivers/ti-soc: remove redundant msg in ti_thermal_expose_sensor()

Message ID 20230613114904.15749-8-frank.li@vivo.com (mailing list archive)
State Superseded
Headers show
Series [v3,01/12] thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() | expand

Commit Message

Yangtao Li June 13, 2023, 11:49 a.m. UTC
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(-)

Comments

J, KEERTHY June 13, 2023, 12:55 p.m. UTC | #1
On 6/13/2023 5:19 PM, Yangtao Li wrote:
> The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
> print error information.

Acked-by: Keerthy <j-keerthy@ti.com>

> 
> 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 6a5335931f4d..d414a4b7a94a 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_write_update_interval(bgp, data->sensor_id,
>   					 TI_BANDGAP_UPDATE_INTERVAL_MS);
>   
> -	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;
>   }
diff mbox series

Patch

diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c
index 6a5335931f4d..d414a4b7a94a 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_write_update_interval(bgp, data->sensor_id,
 					 TI_BANDGAP_UPDATE_INTERVAL_MS);
 
-	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;
 }