From patchwork Tue Aug 2 08:36:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jamie Iles X-Patchwork-Id: 1028402 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p728b5qa025264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 2 Aug 2011 08:37:26 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QoASe-0005Y6-CY; Tue, 02 Aug 2011 08:36:25 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QoASd-0000PJ-Tj; Tue, 02 Aug 2011 08:36:23 +0000 Received: from mail-ww0-f49.google.com ([74.125.82.49]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QoASV-0000Ln-15 for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2011 08:36:16 +0000 Received: by wwf22 with SMTP id 22so4561650wwf.18 for ; Tue, 02 Aug 2011 01:36:13 -0700 (PDT) Received: by 10.216.0.66 with SMTP id 44mr1496789wea.63.1312274173245; Tue, 02 Aug 2011 01:36:13 -0700 (PDT) Received: from localhost (cpc3-chap8-2-0-cust205.aztw.cable.virginmedia.com [94.171.253.206]) by mx.google.com with ESMTPS id l68sm3843131weq.34.2011.08.02.01.36.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Aug 2011 01:36:12 -0700 (PDT) Date: Tue, 2 Aug 2011 09:36:09 +0100 From: Jamie Iles To: Lothar =?iso-8859-1?Q?Wa=DFmann?= Subject: Re: [PATCH] CSR: add missing sentinels to of_device_id tables Message-ID: <20110802083609.GA5063@pulham.picochip.com> References: <1312229376-5982-1-git-send-email-jamie@jamieiles.com> <20023.40012.119095.724255@ipc1.ka-ro> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20023.40012.119095.724255@ipc1.ka-ro> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110802_043615_314457_69E92C68 X-CRM114-Status: GOOD ( 23.43 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] Cc: Jamie Iles , linux-arm-kernel@lists.infradead.org, Barry Song X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 02 Aug 2011 08:37:35 +0000 (UTC) X-MIME-Autoconverted: from quoted-printable to 8bit by demeter1.kernel.org id p728b5qa025264 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 > > Signed-off-by: Jamie Iles > > --- > > 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 Signed-off-by: Jamie Iles --- 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)