lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1405689996-3601-1-git-send-email-suravee.suthikulpanit@amd.com>
Date:	Fri, 18 Jul 2014 08:26:36 -0500
From:	<suravee.suthikulpanit@....com>
To:	<marc.zyngier@....com>, <mark.rutland@....com>,
	<jason@...edaemon.net>
CC:	<pawel.moll@....com>, <Catalin.Marinas@....com>,
	<Will.Deacon@....com>, <tglx@...utronix.de>,
	<Harish.Kasiviswanathan@....com>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-pci@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-doc@...r.kernel.org>, <devicetree@...r.kernel.org>,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>,
	Mark Rutland <Mark.Rutland@....com>,
	"Marc Zyngier" <Marc.Zyngier@....com>
Subject: [PATCH] irqchip: gicv2m: Clean up logic for detecting MSI support

From: Suravee Suthikulpanit <Suravee.Suthikulpanit@....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@....com>
Cc: Marc Zyngier <Marc.Zyngier@....com>
Cc: Jason Cooper <jason@...edaemon.net>
Cc: Catalin Marinas <Catalin.Marinas@....com>
Cc: Will Deacon <Will.Deacon@....com>
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@....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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ