From: Luo Jiaxing <luojiaxing@huawei.com>
To: <maz@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
<linuxarm@openeuler.org>
Subject: [PATCH v1 2/2] genirq/msi: add an error print when __irq_domain_alloc_irqs() failed
Date: Mon, 8 Feb 2021 18:58:46 +0800 [thread overview]
Message-ID: <1612781926-56206-3-git-send-email-luojiaxing@huawei.com> (raw)
In-Reply-To: <1612781926-56206-1-git-send-email-luojiaxing@huawei.com>
During debug, we found that the return value of __irq_domain_alloc_irqs()
will be overwritten by the return value of subsequent function. As a
result, the locating clue will be lost.
To improve debug efficiency, an error message is added to print the
return value of __irq_domain_alloc_irqs().
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
---
kernel/irq/msi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index b338d62..f8729b0 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -418,6 +418,7 @@ int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
desc->affinity);
if (virq < 0) {
ret = -ENOSPC;
+ dev_err(dev, "failed to allocate irq, virq=%d\n", virq);
if (ops->handle_error)
ret = ops->handle_error(domain, desc, ret);
if (ops->msi_finish)
--
2.7.4
next prev parent reply other threads:[~2021-02-08 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 10:58 [PATCH v1 0/2] irqchip/gic-v3-its: don't set bitmap for LPI which user didn't allocate Luo Jiaxing
2021-02-08 10:58 ` [PATCH v1 1/2] " Luo Jiaxing
2021-02-08 11:59 ` Marc Zyngier
2021-02-09 7:25 ` luojiaxing
2021-02-08 10:58 ` Luo Jiaxing [this message]
2021-02-08 11:14 ` [Linuxarm] [PATCH v1 0/2] " John Garry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1612781926-56206-3-git-send-email-luojiaxing@huawei.com \
--to=luojiaxing@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=maz@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).