9d55cb3b | 09-Jul-2024 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
thermal/drivers/broadcom: Simplify with dev_err_probe()
Error handling in probe() can be a bit simpler with dev_err_probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link
thermal/drivers/broadcom: Simplify with dev_err_probe()
Error handling in probe() can be a bit simpler with dev_err_probe().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-3-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
fd972a17 | 09-Jul-2024 |
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> |
thermal/drivers/broadcom: Simplify probe() with local dev variable
Simplify the probe() function by using local 'dev' instead of &pdev->dev.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@
thermal/drivers/broadcom: Simplify probe() with local dev variable
Simplify the probe() function by using local 'dev' instead of &pdev->dev.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240709-thermal-probe-v1-2-241644e2b6e0@linaro.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
aa599650 | 27-Sep-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
thermal: ns: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error h
thermal: ns: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks.
To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
fb6ce327 | 09-Aug-2023 |
Andrei Coardos <aboutphysycs@gmail.com> |
thermal/drivers/broadcom/brcstb_thermal: Removed unneeded platform_set_drvdata()
This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the pr
thermal/drivers/broadcom/brcstb_thermal: Removed unneeded platform_set_drvdata()
This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com> Reviewed-by: Alexandru Ardelean <alex@shruggie.ro> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230809154813.16033-1-aboutphysycs@gmail.com
show more ...
|
1c73c3be | 10-Aug-2023 |
Andrei Coardos <aboutphysycs@gmail.com> |
thermal/drivers/broadcom/sr-thermal: Removed call to platform_set_drvdata()
This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private
thermal/drivers/broadcom/sr-thermal: Removed call to platform_set_drvdata()
This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file.
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com> Reviewed-by: Alexandru Ardelean <alex@shruggie.ro> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230810111330.3248-1-aboutphysycs@gmail.com
show more ...
|
abda7383 | 01-Mar-2023 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
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
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>
show more ...
|
142887ec | 18-Jan-2023 |
ye xingchen <ye.xingchen@zte.com.cn> |
thermal/drivers/bcm2835: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this i
thermal/drivers/bcm2835: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/202301181636223863583@zte.com.cn Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|