From patchwork Tue Jun 11 04:48:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 2699801 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B5A1B3FD4E for ; Tue, 11 Jun 2013 04:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847Ab3FKEsw (ORCPT ); Tue, 11 Jun 2013 00:48:52 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:35038 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821Ab3FKEsv (ORCPT ); Tue, 11 Jun 2013 00:48:51 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p5212-ipbfp1903kobeminato.hyogo.ocn.ne.jp [114.172.132.212]) by kirsty.vergenet.net (Postfix) with ESMTP id DAF1025BF05; Tue, 11 Jun 2013 14:48:49 +1000 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id CA5B2EDE0B3; Tue, 11 Jun 2013 13:48:47 +0900 (JST) Date: Tue, 11 Jun 2013 13:48:47 +0900 From: Simon Horman To: Laurent Pinchart Cc: Olof Johansson , Sergei Shtylyov , Arnd Bergmann , linux-sh@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, Magnus Damm , Magnus Damm Subject: Re: [PATCH 1/8] ARM: shmobile: sh73a0 pinmux platform device cleanup Message-ID: <20130611044847.GH15593@verge.net.au> References: <1369645252-3847-1-git-send-email-horms+renesas@verge.net.au> <20130604052043.GX23054@verge.net.au> <20130604132058.GE3068@verge.net.au> <1722811.MCTrRecTtK@avalon> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1722811.MCTrRecTtK@avalon> Organisation: Horms Solutions Ltd. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Mon, Jun 10, 2013 at 02:31:31PM +0200, Laurent Pinchart wrote: > Hi Simon, > > On Tuesday 04 June 2013 22:20:59 Simon Horman wrote: > > On Tue, Jun 04, 2013 at 02:20:43PM +0900, Simon Horman wrote: > > > On Mon, May 27, 2013 at 09:02:43PM -0700, Olof Johansson wrote: > > > > On Mon, May 27, 2013 at 06:13:22PM +0400, Sergei Shtylyov wrote: > > > > > On 27-05-2013 13:00, Simon Horman wrote: > > > > > >From: Magnus Damm > > > > > > > > > > > >Use DEFINE_RES_MEM() and platform_device_register_simple() > > > > > >to save a couple of lines of code. > > > > > > > > > > > >Signed-off-by: Magnus Damm > > > > > >Acked-by: Laurent Pinchart > > > > > >Signed-off-by: Simon Horman > > > > > >--- > > > > > > > > > > > > arch/arm/mach-shmobile/setup-sh73a0.c | 25 > > > > > > ++++++------------------- > > > > > > 1 file changed, 6 insertions(+), 19 deletions(-) > > > > > > > > > > > >diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c > > > > > >b/arch/arm/mach-shmobile/setup-sh73a0.c index fdf3894..f8f4261 > > > > > >100644 > > > > > >--- a/arch/arm/mach-shmobile/setup-sh73a0.c > > > > > >+++ b/arch/arm/mach-shmobile/setup-sh73a0.c > > > > > >@@ -61,29 +61,16 @@ void __init sh73a0_map_io(void) > > > > > > > > > > [...] > > > > > > > > > > >+/* PFC */ > > > > > >+static const struct resource pfc_resources[] = { > > > > > > > > > > > Should have been annotated as __initdata... too late, need > > > > > > > > > > another patch. > > > > > > > > See comments on other patches/pull requests, I think there's time to > > > > revisit this. I.e. I'll hold off on pulling this based on the other > > > > feedback. > > > > > > As I am respining I will fix this. > > > > > > However, it had been reviewed and I think that ordinarily > > > it would be reasonable to perform further clean-up > > > work in a subsequent patch. > > > > I decided to simply drop the patch and revisit it later. > > This patch (as well as the sh7372 equivalent) is pretty simple. What about > just adding __initdata and resubmitting them ? Otherwise they will get lost. Sure. I took a look at doing this but with the patch below applied I see: # make kzm9g_defconfig # make In file included from arch/arm/mach-shmobile/setup-sh73a0.c:27: include/linux/platform_device.h: In function ‘sh73a0_pinmux_init’: arch/arm/mach-shmobile/setup-sh73a0.c:65: error: pfc_resources causes a section type conflict From 23ea305bcb4513e33ad636b1c735439993fcff74 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 27 May 2013 09:00:45 +0000 Subject: [PATCH] ARM: shmobile: sh73a0 pinmux platform device cleanup Use DEFINE_RES_MEM() and platform_device_register_simple() to save a couple of lines of code. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart [ Annotate pfc_resources with __initdata: causes section missmatch! ] Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-sh73a0.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index c5028f1f..7d90eed 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -61,29 +61,16 @@ void __init sh73a0_map_io(void) iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); } -static struct resource sh73a0_pfc_resources[] = { - [0] = { - .start = 0xe6050000, - .end = 0xe6057fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = 0xe605801c, - .end = 0xe6058027, - .flags = IORESOURCE_MEM, - } -}; - -static struct platform_device sh73a0_pfc_device = { - .name = "pfc-sh73a0", - .id = -1, - .resource = sh73a0_pfc_resources, - .num_resources = ARRAY_SIZE(sh73a0_pfc_resources), +/* PFC */ +static const struct resource pfc_resources[] __initdata = { + DEFINE_RES_MEM(0xe6050000, 0x8000), + DEFINE_RES_MEM(0xe605801c, 0x000c), }; void __init sh73a0_pinmux_init(void) { - platform_device_register(&sh73a0_pfc_device); + platform_device_register_simple("pfc-sh73a0", -1, pfc_resources, + ARRAY_SIZE(pfc_resources)); } static struct plat_sci_port scif0_platform_data = {