From: Stephen Warren <swarren@nvidia.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Linus Walleij <linus.walleij@stericsson.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: RE: [PATCH] pinctrl: Store mapping table as a list of chunks
Date: Thu, 16 Feb 2012 15:41:29 -0800 [thread overview]
Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF1790EC88A5@HQMAIL01.nvidia.com> (raw)
In-Reply-To: <CACRpkdZT+wYopQOJ5Ody1kCgVuxZTTCxq-Q6DLg-uF-FW8bX6w@mail.gmail.com>
Linus Walleij wrote at Thursday, February 16, 2012 12:54 PM:
> On Wed, Feb 15, 2012 at 10:00 PM, Stephen Warren <swarren@nvidia.com> wrote:
> > arch/arm/mach-u300/core.c:
> > -static struct pinctrl_map __initdata u300_pinmux_map[] = {
> > +static struct pinctrl_map u300_pinmux_map[] = {
>
> This was actually not tagged __initdata until last merge window.
>
> The reason it was made discardable was for platform that needed
> to discard a large number of mappings after boot, since only a few
> of them got registered from the board files.
Ah right, yes I see that makes sense. I'll revert that and add back the
copy.
> (Yes, I know this will not be a problem in device tree configs...)
I'll create a helper function that doesn't do the copy for the DT case.
> Can we combine the best of two worlds by still making a
> shallow copy (like previously) and put that shallow copy into the
> list instead?
>
> > +#define for_each_maps(_maps_node_, _i_, _map_) \
> > + list_for_each_entry(_maps_node_, &pinctrl_maps, node) \
> > + for (_i_ = 0, _map_ = &_maps_node_->maps[_i_]; \
> > + _i_ < _maps_node_->num_maps; \
> > + i++, _map_ = &_maps_node_->maps[_i_])
>
> I really like this macro.
Checkpatch doesn't :-( but I think it's OK to ignore it in this case.
--
nvpublic
prev parent reply other threads:[~2012-02-16 23:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 21:00 Stephen Warren
2012-02-16 17:35 ` Stephen Warren
2012-02-16 19:54 ` Linus Walleij
2012-02-16 23:41 ` Stephen Warren [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=74CDBE0F657A3D45AFBB94109FB122FF1790EC88A5@HQMAIL01.nvidia.com \
--to=swarren@nvidia.com \
--cc=arnd@arndb.de \
--cc=linus.walleij@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®