diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-03-01 21:14:34 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-03-03 20:45:02 +0100 |
commit | abda7383ec3a2efc0417d3265b7a872e74fe47e7 (patch) | |
tree | 17164cc167591324d1cdb4d6a2608ef4a035dc59 /drivers/thermal/dove_thermal.c | |
parent | thermal/core: Show a debug message when get_temp() fails (diff) | |
download | linux-abda7383ec3a2efc0417d3265b7a872e74fe47e7.tar.xz linux-abda7383ec3a2efc0417d3265b7a872e74fe47e7.zip |
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/dove_thermal.c')
-rw-r--r-- | drivers/thermal/dove_thermal.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/thermal/dove_thermal.c b/drivers/thermal/dove_thermal.c index 6db1882e8229..9954040d1d2c 100644 --- a/drivers/thermal/dove_thermal.c +++ b/drivers/thermal/dove_thermal.c @@ -91,11 +91,8 @@ static int dove_get_temp(struct thermal_zone_device *thermal, /* Valid check */ reg = readl_relaxed(priv->control + PMU_TEMP_DIOD_CTRL1_REG); - if ((reg & PMU_TDC1_TEMP_VALID_MASK) == 0x0) { - dev_err(&thermal->device, - "Temperature sensor reading not valid\n"); + if ((reg & PMU_TDC1_TEMP_VALID_MASK) == 0x0) return -EIO; - } /* * Calculate temperature. According to Marvell internal |