From: <suravee.suthikulpanit@amd.com>
To: marc.zyngier@arm.com, mark.rutland@arm.com, jason@lakedaemon.net
Cc: pawel.moll@arm.com, Catalin.Marinas@arm.com, Will.Deacon@arm.com,
tglx@linutronix.de, Harish.Kasiviswanathan@amd.com,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
devicetree@vger.kernel.org,
Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
Mark Rutland <Mark.Rutland@arm.com>,
Marc Zyngier <Marc.Zyngier@arm.com>
Subject: [PATCH] irqchip: gicv2m: Clean up logic for detecting MSI support
Date: Fri, 18 Jul 2014 08:26:36 -0500 [thread overview]
Message-ID: <1405689996-3601-1-git-send-email-suravee.suthikulpanit@amd.com> (raw)
From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
It's not quite clear that msi-controller is already checked
by of_msi_chip_add. So, this patch add a note to clarify.
Also, clean up redundant logic and unnecessary pr_info.
Cc: Mark Rutland <Mark.Rutland@arm.com>
Cc: Marc Zyngier <Marc.Zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>
Cc: Will Deacon <Will.Deacon@arm.com>
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
---
Note: This patch is created against irqchip/gic branch.
drivers/irqchip/irq-gic-v2m.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
index e54ca1d..94ed8d6 100644
--- a/drivers/irqchip/irq-gic-v2m.c
+++ b/drivers/irqchip/irq-gic-v2m.c
@@ -235,15 +235,15 @@ gicv2m_of_init(struct device_node *node, struct device_node *parent)
gic->msi_chip.teardown_irq = gicv2m_teardown_msi_irq;
ret = of_pci_msi_chip_add(&gic->msi_chip);
if (ret) {
- /* MSI is optional and not supported here */
- pr_info("GICv2m: MSI is not supported.\n");
+ /*
+ * Note: msi-controller is checked in of_pci_msi_chip_add().
+ * MSI support is optional, and enabled only if msi-controller
+ * is specified. Hence, return 0.
+ */
return 0;
}
- ret = gicv2m_msi_init(node, &gic->v2m_data);
- if (ret)
- return ret;
- return ret;
+ return gicv2m_msi_init(node, &gic->v2m_data);
}
IRQCHIP_DECLARE(arm_gic_400_v2m, "arm,gic-400-v2m", gicv2m_of_init);
--
1.9.0
next reply other threads:[~2014-07-18 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 13:26 suravee.suthikulpanit [this message]
2014-07-18 19:57 ` [PATCH] irqchip: gicv2m: Clean up logic for detecting MSI support Jason Cooper
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=1405689996-3601-1-git-send-email-suravee.suthikulpanit@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=Catalin.Marinas@arm.com \
--cc=Harish.Kasiviswanathan@amd.com \
--cc=Will.Deacon@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=tglx@linutronix.de \
/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).