[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdb0TefNMcXyTRkz6Kv5FifJMmSoXzFTQgKhCt6B0T5sDA@mail.gmail.com>
Date: Tue, 12 Jun 2012 13:01:53 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Devendra Naga <devendra.aaru@...il.com>
Cc: Dong Aisheng <aisheng.dong@...escale.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] pinctrl: pinctrl-imx: free allocated pinctrl_map
structure only once and use kernel facilities for IMX_PMX_DUMP
On Fri, Jun 8, 2012 at 9:22 PM, Devendra Naga <devendra.aaru@...il.com> wrote:
> a) as we allocate the pinctrl_map structure at imx_dt_node_to_map at line 167, anyway
> if its an element, or a num_elements * (sizeof(type)) elements allocated to one single
> pointer must be freed only once.
>
> CASE. A)
>
> as new_map is not moved and allocated like,
>
> for (i = 0; i < MAX_ELEMS; i++) {
> new_map[i] = kmalloc(numelems * size, GFP_KERNEL);
> }
>
> its freed as
>
> for (i = 0; i < MAX_ELEMS; i++) {
> kfree(new_map[i]);
> }
>
> CASE. B)
> and its allocated like
> new_map = kmalloc(numelems * size, GFP_KERNEL);
>
> it just needs kfree not as case A's.
>
> b) use KERN_DEBUG facility for the IMX_PMX_DUMP macro.
>
> Signed-off-by: Devendra Naga <devendra.aaru@...il.com>
> Acked-by: Dong Aisheng <dong.aisheng@...aro.org>
OK I applied this, which I *think* is the last version of the patch,
please double-check that the right one is in my git.
This was send the 9th but not tagged v3 so I was a bit confused...
Yours,
Linus Walleij
--
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