* [PATCH] clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table
@ 2013-03-23 14:28 Axel Lin
2013-03-25 1:11 ` Kukjin Kim
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-03-23 14:28 UTC (permalink / raw)
To: Kukjin Kim, Thomas Gleixner, John Stultz
Cc: Thomas Abraham, Changhwan Youn, linux-kernel
The of_device_id table is supposed to be zero-terminated.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/clocksource/exynos_mct.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 203ac05..3cdafc0 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -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)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table
2013-03-23 14:28 [PATCH] clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table Axel Lin
@ 2013-03-25 1:11 ` Kukjin Kim
2013-03-25 1:18 ` Axel Lin
0 siblings, 1 reply; 4+ messages in thread
From: Kukjin Kim @ 2013-03-25 1:11 UTC (permalink / raw)
To: 'Axel Lin', 'Thomas Gleixner',
'John Stultz'
Cc: 'Thomas Abraham', 'Changhwan Youn', linux-kernel
Axel Lin wrote:
>
> The of_device_id table is supposed to be zero-terminated.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/clocksource/exynos_mct.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clocksource/exynos_mct.c
> b/drivers/clocksource/exynos_mct.c
> index 203ac05..3cdafc0 100644
> --- a/drivers/clocksource/exynos_mct.c
> +++ b/drivers/clocksource/exynos_mct.c
> @@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table
2013-03-25 1:11 ` Kukjin Kim
@ 2013-03-25 1:18 ` Axel Lin
2013-03-25 10:13 ` Kukjin Kim
0 siblings, 1 reply; 4+ messages in thread
From: Axel Lin @ 2013-03-25 1:18 UTC (permalink / raw)
To: Kukjin Kim
Cc: Thomas Gleixner, John Stultz, Thomas Abraham, Changhwan Youn,
linux-kernel
2013/3/25 Kukjin Kim <kgene.kim@samsung.com>:
> Axel Lin wrote:
>>
>> The of_device_id table is supposed to be zero-terminated.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> ---
>> drivers/clocksource/exynos_mct.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/clocksource/exynos_mct.c
>> b/drivers/clocksource/exynos_mct.c
>> index 203ac05..3cdafc0 100644
>> --- a/drivers/clocksource/exynos_mct.c
>> +++ b/drivers/clocksource/exynos_mct.c
>> @@ -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.
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table
2013-03-25 1:18 ` Axel Lin
@ 2013-03-25 10:13 ` Kukjin Kim
0 siblings, 0 replies; 4+ messages in thread
From: Kukjin Kim @ 2013-03-25 10:13 UTC (permalink / raw)
To: 'Axel Lin'
Cc: 'Thomas Gleixner', 'John Stultz',
'Thomas Abraham', 'Changhwan Youn', linux-kernel
Axel Lin wrote:
>
> 2013/3/25 Kukjin Kim <kgene.kim@samsung.com>:
> > Axel Lin wrote:
> >>
> >> The of_device_id table is supposed to be zero-terminated.
> >>
> >> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> >> ---
> >> drivers/clocksource/exynos_mct.c | 1 +
> >> 1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/clocksource/exynos_mct.c
> >> b/drivers/clocksource/exynos_mct.c
> >> index 203ac05..3cdafc0 100644
> >> --- a/drivers/clocksource/exynos_mct.c
> >> +++ b/drivers/clocksource/exynos_mct.c
> >> @@ -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.
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-25 10:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-23 14:28 [PATCH] clocksource: exynos_mct: Add terminating entry for exynos_mct_ids table Axel Lin
2013-03-25 1:11 ` Kukjin Kim
2013-03-25 1:18 ` Axel Lin
2013-03-25 10:13 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox