All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] irqchip/gic-v3: use for_each_matching_node() macro
@ 2020-09-16  6:21 Qinglang Miao
  0 siblings, 0 replies; only message in thread
From: Qinglang Miao @ 2020-09-16  6:21 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier; +Cc: linux-kernel, Qinglang Miao

Use for_each_matching_node() macro instead of open coding it.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c   | 3 +--
 drivers/irqchip/irq-gic-v3-its-pci-msi.c      | 3 +--
 drivers/irqchip/irq-gic-v3-its-platform-msi.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c b/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
index 634263dfd..b4eec9f51 100644
--- a/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
@@ -147,8 +147,7 @@ static void __init its_fsl_mc_of_msi_init(void)
 {
 	struct device_node *np;
 
-	for (np = of_find_matching_node(NULL, its_device_id); np;
-	     np = of_find_matching_node(np, its_device_id)) {
+	for_each_matching_node(np, its_device_id) {
 		if (!of_device_is_available(np))
 			continue;
 		if (!of_property_read_bool(np, "msi-controller"))
diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
index 87711e0f8..fdc596c87 100644
--- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
@@ -130,8 +130,7 @@ static int __init its_pci_of_msi_init(void)
 {
 	struct device_node *np;
 
-	for (np = of_find_matching_node(NULL, its_device_id); np;
-	     np = of_find_matching_node(np, its_device_id)) {
+	for_each_matching_node(np, its_device_id) {
 		if (!of_device_is_available(np))
 			continue;
 		if (!of_property_read_bool(np, "msi-controller"))
diff --git a/drivers/irqchip/irq-gic-v3-its-platform-msi.c b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
index daa6d5053..5ce2c2ff2 100644
--- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
@@ -143,8 +143,7 @@ static void __init its_pmsi_of_init(void)
 {
 	struct device_node *np;
 
-	for (np = of_find_matching_node(NULL, its_device_id); np;
-	     np = of_find_matching_node(np, its_device_id)) {
+	for_each_matching_node(np, its_device_id) {
 		if (!of_device_is_available(np))
 			continue;
 		if (!of_property_read_bool(np, "msi-controller"))
-- 
2.23.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-16  6:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16  6:21 [PATCH -next] irqchip/gic-v3: use for_each_matching_node() macro Qinglang Miao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.