[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <176098441506.2601451.3693832213814934444.tip-bot2@tip-bot2>
Date: Mon, 20 Oct 2025 18:20:15 -0000
From: "tip-bot2 for Christophe JAILLET" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: irq/msi] genirq/msi: Slightly simplify msi_domain_alloc()
The following commit has been merged into the irq/msi branch of tip:
Commit-ID: ac646f44956edc9aaa406b4a8fef17888a2166af
Gitweb: https://git.kernel.org/tip/ac646f44956edc9aaa406b4a8fef17888a2166af
Author: Christophe JAILLET <christophe.jaillet@...adoo.fr>
AuthorDate: Sun, 19 Oct 2025 10:40:08 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Mon, 20 Oct 2025 20:18:48 +02:00
genirq/msi: Slightly simplify msi_domain_alloc()
The return value of irq_find_mapping() is only tested, not used for
anything else.
Replaced it by irq_resolve_mapping() which is internally used by
irq_find_mapping() and allows a simple boolean decision.
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://patch.msgid.link/1ce680114cdb8d40b072c54d7f015696a540e5a6.1760863194.git.christophe.jaillet@wanadoo.fr
---
kernel/irq/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index e7ad992..6888688 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -706,7 +706,7 @@ static int msi_domain_alloc(struct irq_domain *domain, unsigned int virq,
irq_hw_number_t hwirq = ops->get_hwirq(info, arg);
int i, ret;
- if (irq_find_mapping(domain, hwirq) > 0)
+ if (irq_resolve_mapping(domain, hwirq))
return -EEXIST;
if (domain->parent) {
Powered by blists - more mailing lists