Skip to content

Commit 27d2afa

Browse files
tititiou36ingomolnar
authored andcommitted
x86/ioapic: Simplify mp_irqdomain_alloc() slightly
The IRQ return value of irq_find_mapping() is only tested for existence, not used for anything else. So, this call can be replaced by a slightly simpler irq_resolve_mapping() call, which reduces generated code size a bit (x86-64 allmodconfig): text data bss dec hex filename 82142 38633 18048 138823 21e47 arch/x86/kernel/apic/io_apic.o.before 81932 38633 18048 138613 21d75 arch/x86/kernel/apic/io_apic.o.after [ mingo: Fixed & simplified the changelog ] Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: kernel-janitors@vger.kernel.org Link: https://patch.msgid.link/cb3a4968538637aac3a5ae4f5ecc4f5eb43376ea.1760861877.git.christophe.jaillet@wanadoo.fr
1 parent 211ddde commit 27d2afa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kernel/apic/io_apic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2864,7 +2864,7 @@ int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq,
28642864

28652865
ioapic = mp_irqdomain_ioapic_idx(domain);
28662866
pin = info->ioapic.pin;
2867-
if (irq_find_mapping(domain, (irq_hw_number_t)pin) > 0)
2867+
if (irq_resolve_mapping(domain, (irq_hw_number_t)pin))
28682868
return -EEXIST;
28692869

28702870
data = kzalloc(sizeof(*data), GFP_KERNEL);

0 commit comments

Comments
 (0)