* [PATCH] powerpc/ps3: Simplify control flow in ps3_{virq,irq_plug}_setup()
@ 2026-09-14 21:59 Thorsten Blum
2026-09-15 8:02 ` Geert Uytterhoeven
2026-09-15 18:22 ` Amit Machhiwal
0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2026-09-14 21:59 UTC (permalink / raw)
To: Geoff Levand, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy (CS GROUP),
Ritesh Harjani (IBM),
Shrikanth Hegde
Cc: Thorsten Blum, linuxppc-dev, linux-kernel
In ps3_virq_setup() and ps3_irq_plug_setup(), remove the goto statements
and handle errors directly.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
arch/powerpc/platforms/ps3/interrupt.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index a4ad4b49eef7..358611638258 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -184,8 +184,7 @@ static int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (!*virq) {
FAIL("%s:%d: irq_create_mapping failed: outlet %lu\n",
__func__, __LINE__, outlet);
- result = -ENOMEM;
- goto fail_create;
+ return -ENOMEM;
}
DBG("%s:%d: outlet %lu => cpu %u, virq %u\n", __func__, __LINE__,
@@ -196,17 +195,13 @@ static int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (result) {
FAIL("%s:%d: irq_set_chip_data failed\n",
__func__, __LINE__);
- goto fail_set;
+ irq_dispose_mapping(*virq);
+ return result;
}
ps3_chip_mask(irq_get_irq_data(*virq));
return result;
-
-fail_set:
- irq_dispose_mapping(*virq);
-fail_create:
- return result;
}
/**
@@ -250,7 +245,7 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (result) {
FAIL("%s:%d: ps3_virq_setup failed\n", __func__, __LINE__);
- goto fail_setup;
+ return result;
}
pd = irq_get_chip_data(*virq);
@@ -263,16 +258,11 @@ int ps3_irq_plug_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
if (result) {
FAIL("%s:%d: lv1_connect_irq_plug_ext failed: %s\n",
__func__, __LINE__, ps3_result(result));
- result = -EPERM;
- goto fail_connect;
+ ps3_virq_destroy(*virq);
+ return -EPERM;
}
return result;
-
-fail_connect:
- ps3_virq_destroy(*virq);
-fail_setup:
- return result;
}
EXPORT_SYMBOL_GPL(ps3_irq_plug_setup);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc/ps3: Simplify control flow in ps3_{virq,irq_plug}_setup()
2026-09-14 21:59 [PATCH] powerpc/ps3: Simplify control flow in ps3_{virq,irq_plug}_setup() Thorsten Blum
@ 2026-09-15 8:02 ` Geert Uytterhoeven
2026-09-15 18:22 ` Amit Machhiwal
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2026-09-15 8:02 UTC (permalink / raw)
To: Thorsten Blum
Cc: Geoff Levand, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy (CS GROUP),
Ritesh Harjani (IBM),
Shrikanth Hegde, linuxppc-dev, linux-kernel
On Mon, 14 Sept 2026 at 23:59, Thorsten Blum <blum@kernel.org> wrote:
> In ps3_virq_setup() and ps3_irq_plug_setup(), remove the goto statements
> and handle errors directly.
>
> Signed-off-by: Thorsten Blum <blum@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
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] powerpc/ps3: Simplify control flow in ps3_{virq,irq_plug}_setup()
2026-09-14 21:59 [PATCH] powerpc/ps3: Simplify control flow in ps3_{virq,irq_plug}_setup() Thorsten Blum
2026-09-15 8:02 ` Geert Uytterhoeven
@ 2026-09-15 18:22 ` Amit Machhiwal
1 sibling, 0 replies; 3+ messages in thread
From: Amit Machhiwal @ 2026-09-15 18:22 UTC (permalink / raw)
To: Thorsten Blum
Cc: Geoff Levand, Madhavan Srinivasan, Michael Ellerman,
Nicholas Piggin, Christophe Leroy (CS GROUP),
Ritesh Harjani (IBM),
Shrikanth Hegde, linuxppc-dev, linux-kernel
On 2026/09/14 11:59 PM, Thorsten Blum wrote:
> In ps3_virq_setup() and ps3_irq_plug_setup(), remove the goto statements
> and handle errors directly.
>
> Signed-off-by: Thorsten Blum <blum@kernel.org>
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
Thanks,
Amit
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-15 18:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 21:59 [PATCH] powerpc/ps3: Simplify control flow in ps3_{virq,irq_plug}_setup() Thorsten Blum
2026-09-15 8:02 ` Geert Uytterhoeven
2026-09-15 18:22 ` Amit Machhiwal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®