From: Simon Horman <horms@verge.net.au>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v2 7/9] ARM: shmobile: lager: Constify platform data and resources
Date: Fri, 09 Aug 2013 00:33:13 +0000 [thread overview]
Message-ID: <20130809003310.GA26327@verge.net.au> (raw)
In-Reply-To: <1375916192-22647-8-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
On Thu, Aug 08, 2013 at 01:48:20PM +0200, Laurent Pinchart wrote:
> Hi Sergei,
>
> On Thursday 08 August 2013 15:37:30 Sergei Shtylyov wrote:
> > On 08-08-2013 2:56, Laurent Pinchart wrote:
> > > Platform data and resources for Lager devices are kmemdup()ed when the
> > > corresponding devices are registered and can thus be declared as const.
> > > Do so.
> > >
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > >
> > > arch/arm/mach-shmobile/board-lager.c | 14 +++++++-------
> > > 1 file changed, 7 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-shmobile/board-lager.c
> > > b/arch/arm/mach-shmobile/board-lager.c index 4872939..76363f9 100644
> > > --- a/arch/arm/mach-shmobile/board-lager.c
> > > +++ b/arch/arm/mach-shmobile/board-lager.c
> > > @@ -55,7 +55,7 @@ static struct gpio_led lager_leds[] = {
> > >
> > > },
> > >
> > > };
> > >
> > > -static __initdata struct gpio_led_platform_data lager_leds_pdata = {
> > > +static const __initdata struct gpio_led_platform_data lager_leds_pdata > > > {
> >
> > Shouldn't it be annotated with '__initconst' now?
>
> Yes it should, like in the other patches. I'll resubmit the series.
>
> > Also, I've heard that the annotation should come last for the data
> > definitions, otherwise it won't take effect (is that really true?).
>
> I don't know, but I'll move to __initconst last nonetheless, as that's the
> preferred formatting in the kernel.
There seems to be some debate over this,
nonetheless putting it last seems like a good idea.
http://www.spinics.net/lists/arm-kernel/msg264997.html
prev parent reply other threads:[~2013-08-09 0:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 22:56 [PATCH v2 7/9] ARM: shmobile: lager: Constify platform data and resources Laurent Pinchart
2013-08-08 11:37 ` Sergei Shtylyov
2013-08-08 11:48 ` Laurent Pinchart
2013-08-09 0:33 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130809003310.GA26327@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).