diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-03-01 23:14:34 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-03-03 22:45:02 +0300 |
commit | abda7383ec3a2efc0417d3265b7a872e74fe47e7 (patch) | |
tree | 17164cc167591324d1cdb4d6a2608ef4a035dc59 /drivers/thermal/armada_thermal.c | |
parent | 4216e815321580b24dcb972a078ae3f0c808a464 (diff) | |
download | linux-abda7383ec3a2efc0417d3265b7a872e74fe47e7.tar.xz |
thermal: Remove debug or error messages in get_temp() ops
Some get_temp() ops implementation are showing an error or a debug
message if the reading of the sensor fails.
The debug message is already displayed from the call site of this
ops. So we can remove it.
On the other side, the error should not be displayed because in
production that can raise tons of messages.
Finally, some drivers are showing a debug message with the
temperature, this is also accessible through the trace from the core
code in the temperature_update() function.
Another benefit is the dev_* messages are accessing the thermal zone
device field from the structure, so we encapsulate even more the code
by preventing these accesses.
Remove those messages.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> #Armada
Acked-by: Florian Fainelli <f.fainelli@gmail.com> #brcmstb_thermal.c
Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/armada_thermal.c')
-rw-r--r-- | drivers/thermal/armada_thermal.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c index ebd606861a61..0e8dfa6a7757 100644 --- a/drivers/thermal/armada_thermal.c +++ b/drivers/thermal/armada_thermal.c @@ -360,11 +360,8 @@ static int armada_select_channel(struct armada_thermal_priv *priv, int channel) * we must absolutely wait for the sensor validity bit to ensure we read * actual data. */ - if (armada_wait_sensor_validity(priv)) { - dev_err(priv->dev, - "Temperature sensor reading not valid\n"); + if (armada_wait_sensor_validity(priv)) return -EIO; - } return 0; } @@ -402,11 +399,8 @@ static int armada_get_temp_legacy(struct thermal_zone_device *thermal, int ret; /* Valid check */ - if (!armada_is_valid(priv)) { - dev_err(priv->dev, - "Temperature sensor reading not valid\n"); + if (!armada_is_valid(priv)) return -EIO; - } /* Do the actual reading */ ret = armada_read_sensor(priv, temp); |