From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv4 RESEND 0/6] arm: vt8500: Add support for pinctrl/gpio module
Date: Tue, 02 Apr 2013 17:17:43 -0600 [thread overview]
Message-ID: <515B6717.1060602@wwwdotorg.org> (raw)
In-Reply-To: <1364877661-26086-1-git-send-email-linux@prisktech.co.nz>
On 04/01/2013 10:40 PM, Tony Prisk wrote:
> Sorry - got Linus W's email address wrong in first send.
>
> v4 changes:
> Changed as requested by Stephen Warren:
> Corrected the range checking in of_property_read_u32_index().
> Fix configs[0] assignment in wmt_pctl_dt_node_to_map_pull().
> Move the platform memory mapping from per-soc to common init.
> Drop the custom .of_xlate function and use the default of_gpio_simple_xlate.
Those changes all look fine.
> Remove the kfree(maps) call, and use devm_kzalloc to simplify the fail path.
I'm not sure that's a good idea.
The issue is that dt_node_to_maps() is called every time a pinctrl
consumer is probed, whereas the devm_kzalloc() call in dt_node_to_maps()
uses the pinctrl device itself, not the pinctrl consumer device.. Each
client's probe() could be deferred a few times. Hence, you may end up
accumulating all those map entries from the deferred probes, until the
pinctrl driver itself is remove()d. Similarly, if you unload/load a
(pinctrl client) driver module over and over, the same thing will happen.
Oh, and you left the following in there too:
> +static void wmt_pctl_dt_free_map(struct pinctrl_dev *pctldev,
> + kfree(maps);
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Tony Prisk <linux@prisktech.co.nz>
Cc: linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org,
vt8500-wm8505-linux-kernel@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv4 RESEND 0/6] arm: vt8500: Add support for pinctrl/gpio module
Date: Tue, 02 Apr 2013 17:17:43 -0600 [thread overview]
Message-ID: <515B6717.1060602@wwwdotorg.org> (raw)
In-Reply-To: <1364877661-26086-1-git-send-email-linux@prisktech.co.nz>
On 04/01/2013 10:40 PM, Tony Prisk wrote:
> Sorry - got Linus W's email address wrong in first send.
>
> v4 changes:
> Changed as requested by Stephen Warren:
> Corrected the range checking in of_property_read_u32_index().
> Fix configs[0] assignment in wmt_pctl_dt_node_to_map_pull().
> Move the platform memory mapping from per-soc to common init.
> Drop the custom .of_xlate function and use the default of_gpio_simple_xlate.
Those changes all look fine.
> Remove the kfree(maps) call, and use devm_kzalloc to simplify the fail path.
I'm not sure that's a good idea.
The issue is that dt_node_to_maps() is called every time a pinctrl
consumer is probed, whereas the devm_kzalloc() call in dt_node_to_maps()
uses the pinctrl device itself, not the pinctrl consumer device.. Each
client's probe() could be deferred a few times. Hence, you may end up
accumulating all those map entries from the deferred probes, until the
pinctrl driver itself is remove()d. Similarly, if you unload/load a
(pinctrl client) driver module over and over, the same thing will happen.
Oh, and you left the following in there too:
> +static void wmt_pctl_dt_free_map(struct pinctrl_dev *pctldev,
> + kfree(maps);
next prev parent reply other threads:[~2013-04-02 23:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 4:40 [PATCHv4 RESEND 0/6] arm: vt8500: Add support for pinctrl/gpio module Tony Prisk
2013-04-02 4:40 ` Tony Prisk
2013-04-02 4:40 ` [PATCHv4 1/6] of: Add support for reading a u32 from a multi-value property Tony Prisk
2013-04-02 4:40 ` Tony Prisk
2013-04-02 23:42 ` Rob Herring
2013-04-02 23:42 ` Rob Herring
2013-04-02 4:40 ` [PATCHv4 2/6] arm: vt8500: Increase available GPIOs on arch-vt8500 Tony Prisk
2013-04-02 4:40 ` Tony Prisk
2013-04-02 4:40 ` [PATCHv4 3/6] pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500 Tony Prisk
2013-04-02 4:40 ` Tony Prisk
2013-04-02 4:40 ` [PATCHv4 4/6] arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver Tony Prisk
2013-04-02 4:40 ` Tony Prisk
2013-04-02 4:41 ` [PATCHv4 5/6] arm: vt8500: Remove gpio devicetree nodes Tony Prisk
2013-04-02 4:41 ` Tony Prisk
2013-04-02 4:41 ` [PATCHv4 6/6] gpio: vt8500: Remove arch-vt8500 gpio driver Tony Prisk
2013-04-02 4:41 ` Tony Prisk
2013-04-02 23:17 ` Stephen Warren [this message]
2013-04-02 23:17 ` [PATCHv4 RESEND 0/6] arm: vt8500: Add support for pinctrl/gpio module Stephen Warren
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=515B6717.1060602@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.