Skip to contentSkip to conversation

clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table

PATCH Applied Axel Lin 2 participants 4 messages Mar 23, 2013 – Mar 25, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table

The of_device_id table is supposed to be zero-terminated.

---
 drivers/clocksource/exynos_mct.c |    1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/exynos_mct.c +1 -0
index 203ac05..3cdafc0 100644
@@ -514,6 +514,7 @@ static void __init exynos4_timer_resources(struct device_node *np)
 static const struct of_device_id exynos_mct_ids[] = {
 	{ .compatible = "samsung,exynos4210-mct", .data = (void *)MCT_INT_SPI },
 	{ .compatible = "samsung,exynos4412-mct", .data = (void *)MCT_INT_PPI },
+	{ }
 };
 
 void __init mct_init(void)
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 14 lines · Axel Lin

The of_device_id table is supposed to be zero-terminated.

---
 drivers/clocksource/exynos_mct.c |    1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/exynos_mct.c +0 -0
index 203ac05..3cdafc0 100644

drivers/clocksource/exynos_mct.c static void __init exynos4_timer_resources(struct · line 520

Quoted 7 lines
drivers/clocksource/exynos_mct.c +1 -0
@@ -514,6 +514,7 @@ static void __init exynos4_timer_resources(struct
 device_node *np)
 static const struct of_device_id exynos_mct_ids[] = {
 	{ .compatible = "samsung,exynos4210-mct", .data = (void
 *)MCT_INT_SPI },
 	{ .compatible = "samsung,exynos4412-mct", .data = (void
 *)MCT_INT_PPI },
+	{ }

Thanks for your pointing out. But as I know, it is not mandatory now.

Please correct me if I'm wrong.

Thanks.

- Kukjin

author
#2 lore raw

2013/3/25 Kukjin Kim <[email protected]>:

Quoted 25 lines
Quoted 14 lines · Axel Lin

The of_device_id table is supposed to be zero-terminated.

---
 drivers/clocksource/exynos_mct.c |    1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/exynos_mct.c +0 -0
index 203ac05..3cdafc0 100644

drivers/clocksource/exynos_mct.c static void __init exynos4_timer_resources(struct · line 520

Quoted 7 lines
drivers/clocksource/exynos_mct.c +1 -0
@@ -514,6 +514,7 @@ static void __init exynos4_timer_resources(struct
 device_node *np)
 static const struct of_device_id exynos_mct_ids[] = {
      { .compatible = "samsung,exynos4210-mct", .data = (void
 *)MCT_INT_SPI },
      { .compatible = "samsung,exynos4412-mct", .data = (void
 *)MCT_INT_PPI },
+     { }

Thanks for your pointing out. But as I know, it is not mandatory now.

Quoted 1 line

Please correct me if I'm wrong.

of_find_matching_node_and_match()
-> __of_match_node()

    while (matches->name[0] || matches->type[0] || matches->compatible[0])

My understanding is the implementation in _of_match_node() still needs zero-terminated entry to break out the while loop.

Applied
#3 lore raw
Quoted 27 lines · Axel Lin

2013/3/25 Kukjin Kim <[email protected]>:

Quoted 25 lines
Quoted 14 lines · Axel Lin

The of_device_id table is supposed to be zero-terminated.

---
 drivers/clocksource/exynos_mct.c |    1 +
 1 file changed, 1 insertion(+)
drivers/clocksource/exynos_mct.c +0 -0
index 203ac05..3cdafc0 100644

drivers/clocksource/exynos_mct.c static void __init exynos4_timer_resources(struct · line 520

Quoted 7 lines
drivers/clocksource/exynos_mct.c +1 -0
@@ -514,6 +514,7 @@ static void __init exynos4_timer_resources(struct
 device_node *np)
 static const struct of_device_id exynos_mct_ids[] = {
      { .compatible = "samsung,exynos4210-mct", .data = (void
 *)MCT_INT_SPI },
      { .compatible = "samsung,exynos4412-mct", .data = (void
 *)MCT_INT_PPI },
+     { }

Thanks for your pointing out. But as I know, it is not mandatory now.

Quoted 8 lines
Quoted 1 line

Please correct me if I'm wrong.

of_find_matching_node_and_match()
-> __of_match_node()

    while (matches->name[0] || matches->type[0] || matches->compatible[0])

My understanding is the implementation in _of_match_node() still needs zero-terminated entry to break out the while loop.

OK, you're right. In this case, a null entry is required in __of_match_node().

Thanks, applied.

- Kukjin