All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] thermal: rcar_thermal: Add missing braces to conditional statement
@ 2020-08-19  9:27 Geert Uytterhoeven
  2020-08-20  6:45 ` Niklas Söderlund
  2020-08-24 10:41 ` Daniel Lezcano
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-08-19  9:27 UTC (permalink / raw)
  To: Niklas Söderlund, Zhang Rui, Daniel Lezcano, Amit Kucheria,
	Bartlomiej Zolnierkiewicz, Andrzej Pietrasiewicz
  Cc: linux-renesas-soc, linux-pm, Geert Uytterhoeven

According to Documentation/process/coding-style.rst, if one branch of a
conditional statement needs braces, both branches should use braces.

Fixes: bbcf90c0646ac797 ("thermal: Explicitly enable non-changing thermal zone devices")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/thermal/rcar_thermal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
index 787710bb88fee890..5c2a13bf249ccb87 100644
--- a/drivers/thermal/rcar_thermal.c
+++ b/drivers/thermal/rcar_thermal.c
@@ -546,11 +546,11 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 		if (ret < 0)
 			goto error_unregister;
 
-		if (chip->use_of_thermal)
+		if (chip->use_of_thermal) {
 			priv->zone = devm_thermal_zone_of_sensor_register(
 						dev, i, priv,
 						&rcar_thermal_zone_of_ops);
-		else {
+		} else {
 			priv->zone = thermal_zone_device_register(
 						"rcar_thermal",
 						1, 0, priv,
-- 
2.17.1


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

* Re: [PATCH] thermal: rcar_thermal: Add missing braces to conditional statement
  2020-08-19  9:27 [PATCH] thermal: rcar_thermal: Add missing braces to conditional statement Geert Uytterhoeven
@ 2020-08-20  6:45 ` Niklas Söderlund
  2020-08-24 10:41 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2020-08-20  6:45 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Zhang Rui, Daniel Lezcano, Amit Kucheria,
	Bartlomiej Zolnierkiewicz, Andrzej Pietrasiewicz,
	linux-renesas-soc, linux-pm

Hi Geert,

Thanks for your work.

On 2020-08-19 11:27:16 +0200, Geert Uytterhoeven wrote:
> According to Documentation/process/coding-style.rst, if one branch of a
> conditional statement needs braces, both branches should use braces.
> 
> Fixes: bbcf90c0646ac797 ("thermal: Explicitly enable non-changing thermal zone devices")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/thermal/rcar_thermal.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index 787710bb88fee890..5c2a13bf249ccb87 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -546,11 +546,11 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  		if (ret < 0)
>  			goto error_unregister;
>  
> -		if (chip->use_of_thermal)
> +		if (chip->use_of_thermal) {
>  			priv->zone = devm_thermal_zone_of_sensor_register(
>  						dev, i, priv,
>  						&rcar_thermal_zone_of_ops);
> -		else {
> +		} else {
>  			priv->zone = thermal_zone_device_register(
>  						"rcar_thermal",
>  						1, 0, priv,
> -- 
> 2.17.1
> 

-- 
Regards,
Niklas Söderlund

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

* Re: [PATCH] thermal: rcar_thermal: Add missing braces to conditional statement
  2020-08-19  9:27 [PATCH] thermal: rcar_thermal: Add missing braces to conditional statement Geert Uytterhoeven
  2020-08-20  6:45 ` Niklas Söderlund
@ 2020-08-24 10:41 ` Daniel Lezcano
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Lezcano @ 2020-08-24 10:41 UTC (permalink / raw)
  To: Geert Uytterhoeven, Niklas Söderlund, Zhang Rui,
	Amit Kucheria, Bartlomiej Zolnierkiewicz, Andrzej Pietrasiewicz
  Cc: linux-renesas-soc, linux-pm

On 19/08/2020 11:27, Geert Uytterhoeven wrote:
> According to Documentation/process/coding-style.rst, if one branch of a
> conditional statement needs braces, both branches should use braces.
> 
> Fixes: bbcf90c0646ac797 ("thermal: Explicitly enable non-changing thermal zone devices")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Applied, thanks


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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

end of thread, other threads:[~2020-08-24 10:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19  9:27 [PATCH] thermal: rcar_thermal: Add missing braces to conditional statement Geert Uytterhoeven
2020-08-20  6:45 ` Niklas Söderlund
2020-08-24 10:41 ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.