From 08149ec55598fa87d54fbfc00cc29263b078decf Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 27 Aug 2026 08:06:39 +0200 Subject: [PATCH] x86/IO-APIC: replace redundant irq_trigger() call 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 Acked-by: Andrew Cooper --- xen/arch/x86/io_apic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 46c2a43dac..8310314fbe 100644 --- 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(void) 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);