[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF1790EC88A5@HQMAIL01.nvidia.com>
Date: Thu, 16 Feb 2012 15:41:29 -0800
From: Stephen Warren <swarren@...dia.com>
To: Linus Walleij <linus.walleij@...aro.org>
CC: Linus Walleij <linus.walleij@...ricsson.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>
Subject: RE: [PATCH] pinctrl: Store mapping table as a list of chunks
Linus Walleij wrote at Thursday, February 16, 2012 12:54 PM:
> On Wed, Feb 15, 2012 at 10:00 PM, Stephen Warren <swarren@...dia.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists