[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 2 Feb 2012 10:43:13 -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>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Grant Likely <grant.likely@...retlab.ca>,
Barry Song <21cnbao@...il.com>,
Shawn Guo <shawn.guo@...escale.com>,
Thomas Abraham <thomas.abraham@...aro.org>,
Dong Aisheng <dong.aisheng@...aro.org>,
Rajendra Nayak <rajendra.nayak@...aro.org>,
Haojian Zhuang <haojian.zhuang@...vell.com>
Subject: RE: [PATCH] pinctrl: pin configuration states
Linus Walleij wrote at Wednesday, February 01, 2012 12:29 PM:
> On Thu, Jan 19, 2012 at 8:03 PM, Stephen Warren <swarren@...dia.com> wrote:
...
> >> + /*
> >> + * Make a copy of the config state array - string pointers will end up
> > ...
> >> + pinconf_states = tmp;
> >> + pinconf_states_num += num_states;
> >
> > We need to allow multiple tables to be registered, for all the same
> > reasons we do for the pinmux mapping table. This implementation only
> > keeps the most recently registered table.
>
> ? beats me.
>
> Please check the code for how I realloc the tmp variable (in the v2
> patch set), I cannot spot the problem. It was designed to allow exactly
> multiple calls to add tables piece by piece.
Sorry, I must have been asleep when I wrote that...
I was expecting the implementation to copy each table separately and
store them in a list (since this would allow easy dynamic removel of the
entries too), hence when I saw the assignment to a single global, I
assumed it was just over-writing it; I guess I didn't even look at the
realloc above or noticed that it was assigning "tmp" not just the caller-
supplied parameter:-(
--
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