linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CSR: add missing sentinels to of_device_id tables
@ 2011-08-01 20:09 Jamie Iles
  2011-08-02  6:42 ` Lothar Waßmann
  0 siblings, 1 reply; 4+ messages in thread
From: Jamie Iles @ 2011-08-01 20:09 UTC (permalink / raw)
  To: linux-arm-kernel

The of_device_id tables used for matching should be terminated with
empty sentinel values.

Cc: Barry Song <baohua.song@csr.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/arm/mach-prima2/clock.c |    1 +
 arch/arm/mach-prima2/irq.c   |    1 +
 arch/arm/mach-prima2/rstc.c  |    1 +
 arch/arm/mach-prima2/timer.c |    1 +
 4 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
index f9a2aaf..615a4e7 100644
--- a/arch/arm/mach-prima2/clock.c
+++ b/arch/arm/mach-prima2/clock.c
@@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
 
 static struct of_device_id clkc_ids[] = {
 	{ .compatible = "sirf,prima2-clkc" },
+	{},
 };
 
 void __init sirfsoc_of_clk_init(void)
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c
index c3404cb..7af254d 100644
--- a/arch/arm/mach-prima2/irq.c
+++ b/arch/arm/mach-prima2/irq.c
@@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void)
 
 static struct of_device_id intc_ids[]  = {
 	{ .compatible = "sirf,prima2-intc" },
+	{},
 };
 
 void __init sirfsoc_of_irq_init(void)
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index d074786..492cfa8 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock);
 
 static struct of_device_id rstc_ids[]  = {
 	{ .compatible = "sirf,prima2-rstc" },
+	{},
 };
 
 static int __init sirfsoc_of_rstc_init(void)
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index 44027f3..ed7ec48 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void)
 
 static struct of_device_id timer_ids[] = {
 	{ .compatible = "sirf,prima2-tick" },
+	{},
 };
 
 static void __init sirfsoc_of_timer_map(void)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] CSR: add missing sentinels to of_device_id tables
  2011-08-01 20:09 [PATCH] CSR: add missing sentinels to of_device_id tables Jamie Iles
@ 2011-08-02  6:42 ` Lothar Waßmann
  2011-08-02  8:36   ` Jamie Iles
  0 siblings, 1 reply; 4+ messages in thread
From: Lothar Waßmann @ 2011-08-02  6:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Jamie Iles writes:
> The of_device_id tables used for matching should be terminated with
> empty sentinel values.
> 
> Cc: Barry Song <baohua.song@csr.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
>  arch/arm/mach-prima2/clock.c |    1 +
>  arch/arm/mach-prima2/irq.c   |    1 +
>  arch/arm/mach-prima2/rstc.c  |    1 +
>  arch/arm/mach-prima2/timer.c |    1 +
>  4 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
> index f9a2aaf..615a4e7 100644
> --- a/arch/arm/mach-prima2/clock.c
> +++ b/arch/arm/mach-prima2/clock.c
> @@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
>  
>  static struct of_device_id clkc_ids[] = {
>  	{ .compatible = "sirf,prima2-clkc" },
> +	{},
I would add a comment like '/* end of list sentinel */' inside the
'{}' to make it crystal clear that the empty braces are intentional.
I also would omit the comma since it would be an error adding more
entries after this one.



Lothar Wa?mann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] CSR: add missing sentinels to of_device_id tables
  2011-08-02  6:42 ` Lothar Waßmann
@ 2011-08-02  8:36   ` Jamie Iles
  2011-08-03  0:17     ` Barry Song
  0 siblings, 1 reply; 4+ messages in thread
From: Jamie Iles @ 2011-08-02  8:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Aug 02, 2011 at 08:42:20AM +0200, Lothar Wa?mann wrote:
> Hi,
> 
> Jamie Iles writes:
> > The of_device_id tables used for matching should be terminated with
> > empty sentinel values.
> > 
> > Cc: Barry Song <baohua.song@csr.com>
> > Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> > ---
> >  arch/arm/mach-prima2/clock.c |    1 +
> >  arch/arm/mach-prima2/irq.c   |    1 +
> >  arch/arm/mach-prima2/rstc.c  |    1 +
> >  arch/arm/mach-prima2/timer.c |    1 +
> >  4 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
> > index f9a2aaf..615a4e7 100644
> > --- a/arch/arm/mach-prima2/clock.c
> > +++ b/arch/arm/mach-prima2/clock.c
> > @@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
> >  
> >  static struct of_device_id clkc_ids[] = {
> >  	{ .compatible = "sirf,prima2-clkc" },
> > +	{},
> I would add a comment like '/* end of list sentinel */' inside the
> '{}' to make it crystal clear that the empty braces are intentional.
> I also would omit the comma since it would be an error adding more
> entries after this one.

OK.  Revised patch below.

Thanks Lothar!

8<----

Date: Mon, 1 Aug 2011 21:09:36 +0100
Subject: [PATCH] CSR: add missing sentinels to of_device_id tables

The of_device_id tables used for matching should be terminated with
empty sentinel values.

Cc: Barry Song <baohua.song@csr.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
---
 arch/arm/mach-prima2/clock.c |    1 +
 arch/arm/mach-prima2/irq.c   |    1 +
 arch/arm/mach-prima2/rstc.c  |    1 +
 arch/arm/mach-prima2/timer.c |    1 +
 4 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
index f9a2aaf..7c56320 100644
--- a/arch/arm/mach-prima2/clock.c
+++ b/arch/arm/mach-prima2/clock.c
@@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
 
 static struct of_device_id clkc_ids[] = {
 	{ .compatible = "sirf,prima2-clkc" },
+	{ /* Sentinel */ }
 };
 
 void __init sirfsoc_of_clk_init(void)
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c
index c3404cb..0f3ddb7 100644
--- a/arch/arm/mach-prima2/irq.c
+++ b/arch/arm/mach-prima2/irq.c
@@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void)
 
 static struct of_device_id intc_ids[]  = {
 	{ .compatible = "sirf,prima2-intc" },
+	{ /* Sentinel */ }
 };
 
 void __init sirfsoc_of_irq_init(void)
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
index d074786..b0b5fa1 100644
--- a/arch/arm/mach-prima2/rstc.c
+++ b/arch/arm/mach-prima2/rstc.c
@@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock);
 
 static struct of_device_id rstc_ids[]  = {
 	{ .compatible = "sirf,prima2-rstc" },
+	{ /* Sentinel */ }
 };
 
 static int __init sirfsoc_of_rstc_init(void)
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index 44027f3..366a9aa 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void)
 
 static struct of_device_id timer_ids[] = {
 	{ .compatible = "sirf,prima2-tick" },
+	{ /* Sentinel */ }
 };
 
 static void __init sirfsoc_of_timer_map(void)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] CSR: add missing sentinels to of_device_id tables
  2011-08-02  8:36   ` Jamie Iles
@ 2011-08-03  0:17     ` Barry Song
  0 siblings, 0 replies; 4+ messages in thread
From: Barry Song @ 2011-08-03  0:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jamie,

2011/8/2 Jamie Iles <jamie@jamieiles.com>:
> On Tue, Aug 02, 2011 at 08:42:20AM +0200, Lothar Wa?mann wrote:
>> Hi,
>>
>> Jamie Iles writes:
>> > The of_device_id tables used for matching should be terminated with
>> > empty sentinel values.
>> >
>> > Cc: Barry Song <baohua.song@csr.com>
>> > Signed-off-by: Jamie Iles <jamie@jamieiles.com>

fine with me, i'll merge this. thanks!

>> > ---
>> > ?arch/arm/mach-prima2/clock.c | ? ?1 +
>> > ?arch/arm/mach-prima2/irq.c ? | ? ?1 +
>> > ?arch/arm/mach-prima2/rstc.c ?| ? ?1 +
>> > ?arch/arm/mach-prima2/timer.c | ? ?1 +
>> > ?4 files changed, 4 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
>> > index f9a2aaf..615a4e7 100644
>> > --- a/arch/arm/mach-prima2/clock.c
>> > +++ b/arch/arm/mach-prima2/clock.c
>> > @@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
>> >
>> > ?static struct of_device_id clkc_ids[] = {
>> > ? ? { .compatible = "sirf,prima2-clkc" },
>> > + ? {},
>> I would add a comment like '/* end of list sentinel */' inside the
>> '{}' to make it crystal clear that the empty braces are intentional.
>> I also would omit the comma since it would be an error adding more
>> entries after this one.
>
> OK. ?Revised patch below.
>
> Thanks Lothar!
>
> 8<----
>
> Date: Mon, 1 Aug 2011 21:09:36 +0100
> Subject: [PATCH] CSR: add missing sentinels to of_device_id tables
>
> The of_device_id tables used for matching should be terminated with
> empty sentinel values.
>
> Cc: Barry Song <baohua.song@csr.com>
> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
> ---
> ?arch/arm/mach-prima2/clock.c | ? ?1 +
> ?arch/arm/mach-prima2/irq.c ? | ? ?1 +
> ?arch/arm/mach-prima2/rstc.c ?| ? ?1 +
> ?arch/arm/mach-prima2/timer.c | ? ?1 +
> ?4 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-prima2/clock.c b/arch/arm/mach-prima2/clock.c
> index f9a2aaf..7c56320 100644
> --- a/arch/arm/mach-prima2/clock.c
> +++ b/arch/arm/mach-prima2/clock.c
> @@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
>
> ?static struct of_device_id clkc_ids[] = {
> ? ? ? ?{ .compatible = "sirf,prima2-clkc" },
> + ? ? ? { /* Sentinel */ }
> ?};
>
> ?void __init sirfsoc_of_clk_init(void)
> diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-prima2/irq.c
> index c3404cb..0f3ddb7 100644
> --- a/arch/arm/mach-prima2/irq.c
> +++ b/arch/arm/mach-prima2/irq.c
> @@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void)
>
> ?static struct of_device_id intc_ids[] ?= {
> ? ? ? ?{ .compatible = "sirf,prima2-intc" },
> + ? ? ? { /* Sentinel */ }
> ?};
>
> ?void __init sirfsoc_of_irq_init(void)
> diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-prima2/rstc.c
> index d074786..b0b5fa1 100644
> --- a/arch/arm/mach-prima2/rstc.c
> +++ b/arch/arm/mach-prima2/rstc.c
> @@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock);
>
> ?static struct of_device_id rstc_ids[] ?= {
> ? ? ? ?{ .compatible = "sirf,prima2-rstc" },
> + ? ? ? { /* Sentinel */ }
> ?};
>
> ?static int __init sirfsoc_of_rstc_init(void)
> diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
> index 44027f3..366a9aa 100644
> --- a/arch/arm/mach-prima2/timer.c
> +++ b/arch/arm/mach-prima2/timer.c
> @@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void)
>
> ?static struct of_device_id timer_ids[] = {
> ? ? ? ?{ .compatible = "sirf,prima2-tick" },
> + ? ? ? { /* Sentinel */ }
> ?};
>
> ?static void __init sirfsoc_of_timer_map(void)
> --
> 1.7.4.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
-barry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-03  0:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-01 20:09 [PATCH] CSR: add missing sentinels to of_device_id tables Jamie Iles
2011-08-02  6:42 ` Lothar Waßmann
2011-08-02  8:36   ` Jamie Iles
2011-08-03  0:17     ` Barry Song

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).