* [PATCH] irqchip/renesas-rzg2l: remove braces around single statement if block
@ 2025-10-22 7:35 Cosmin Tanislav
2025-10-22 9:23 ` Geert Uytterhoeven
2025-10-22 16:19 ` Thomas Gleixner
0 siblings, 2 replies; 3+ messages in thread
From: Cosmin Tanislav @ 2025-10-22 7:35 UTC (permalink / raw)
Cc: Thomas Gleixner, Fabrizio Castro, Lad Prabhakar,
Geert Uytterhoeven, linux-kernel, Cosmin Tanislav
Braces around single statement if blocks are unnecessary, remove them.
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/irqchip/irq-renesas-rzg2l.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c
index 1bf19deb02c4..6e215649bf29 100644
--- a/drivers/irqchip/irq-renesas-rzg2l.c
+++ b/drivers/irqchip/irq-renesas-rzg2l.c
@@ -555,10 +555,9 @@ static int rzg2l_irqc_common_probe(struct platform_device *pdev, struct device_n
return dev_err_probe(dev, ret, "cannot parse interrupts: %d\n", ret);
resetn = devm_reset_control_get_exclusive_deasserted(dev, NULL);
- if (IS_ERR(resetn)) {
+ if (IS_ERR(resetn))
return dev_err_probe(dev, PTR_ERR(resetn),
"failed to acquire deasserted reset: %d\n", ret);
- }
ret = devm_pm_runtime_enable(dev);
if (ret)
--
2.51.1.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip/renesas-rzg2l: remove braces around single statement if block
2025-10-22 7:35 [PATCH] irqchip/renesas-rzg2l: remove braces around single statement if block Cosmin Tanislav
@ 2025-10-22 9:23 ` Geert Uytterhoeven
2025-10-22 16:19 ` Thomas Gleixner
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2025-10-22 9:23 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: Thomas Gleixner, Fabrizio Castro, Lad Prabhakar, linux-kernel
On Wed, 22 Oct 2025 at 09:36, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@renesas.com> wrote:
> Braces around single statement if blocks are unnecessary, remove them.
>
> Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] irqchip/renesas-rzg2l: remove braces around single statement if block
2025-10-22 7:35 [PATCH] irqchip/renesas-rzg2l: remove braces around single statement if block Cosmin Tanislav
2025-10-22 9:23 ` Geert Uytterhoeven
@ 2025-10-22 16:19 ` Thomas Gleixner
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2025-10-22 16:19 UTC (permalink / raw)
To: Cosmin Tanislav
Cc: Fabrizio Castro, Lad Prabhakar, Geert Uytterhoeven, linux-kernel,
Cosmin Tanislav
On Wed, Oct 22 2025 at 10:35, Cosmin Tanislav wrote:
> Braces around single statement if blocks are unnecessary, remove them.
>
> Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
> ---
> drivers/irqchip/irq-renesas-rzg2l.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c
> index 1bf19deb02c4..6e215649bf29 100644
> --- a/drivers/irqchip/irq-renesas-rzg2l.c
> +++ b/drivers/irqchip/irq-renesas-rzg2l.c
> @@ -555,10 +555,9 @@ static int rzg2l_irqc_common_probe(struct platform_device *pdev, struct device_n
> return dev_err_probe(dev, ret, "cannot parse interrupts: %d\n", ret);
>
> resetn = devm_reset_control_get_exclusive_deasserted(dev, NULL);
> - if (IS_ERR(resetn)) {
> + if (IS_ERR(resetn))
> return dev_err_probe(dev, PTR_ERR(resetn),
> "failed to acquire deasserted reset: %d\n", ret);
> - }
No. That's visual garbage and breaks the reading flow as the lack of
brackets indicates that there is a single line following after the if():
if (cond)
foo();
is perfectly readable but
if (cond)
foo(................................,
............................);
is not.
You are right, C does not require the brackets for the single
statement. But humans read in patterns and the expected pattern for a
if() or for() is that if it has no brackets then there follows a single
line statement. If that pattern is not there the reading flow is
disturbed.
Thanks,
tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-22 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-22 7:35 [PATCH] irqchip/renesas-rzg2l: remove braces around single statement if block Cosmin Tanislav
2025-10-22 9:23 ` Geert Uytterhoeven
2025-10-22 16:19 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox