* [PATCH] x86/IO-APIC: replace redundant irq_trigger() call
@ 2026-08-26 14:40 Jan Beulich
2026-08-26 14:42 ` Andrew Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2026-08-26 14:40 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Teddy Astie, Roger Pau Monné
Just having called the function and stored the result, there's no point in
calling it again right away with the same argument; the stored result can
be used instead. And the stored result also doesn't need overwriting again
with the same value.
No functional change intended.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -1089,10 +1089,8 @@ static void __init setup_IO_APIC_irqs(vo
entry.trigger = irq_trigger(idx);
entry.polarity = irq_polarity(idx);
- if (irq_trigger(idx)) {
- entry.trigger = 1;
+ if (entry.trigger)
entry.mask = 1;
- }
irq = pin_2_irq(idx, apic, pin);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/IO-APIC: replace redundant irq_trigger() call
2026-08-26 14:40 [PATCH] x86/IO-APIC: replace redundant irq_trigger() call Jan Beulich
@ 2026-08-26 14:42 ` Andrew Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2026-08-26 14:42 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Teddy Astie, Roger Pau Monné
On 26/08/2026 3:40 pm, Jan Beulich wrote:
> Just having called the function and stored the result, there's no point in
> calling it again right away with the same argument; the stored result can
> be used instead. And the stored result also doesn't need overwriting again
> with the same value.
>
> No functional change intended.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-26 14:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 14:40 [PATCH] x86/IO-APIC: replace redundant irq_trigger() call Jan Beulich
2026-08-26 14:42 ` Andrew Cooper
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.