Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-22 Thread Linus Walleij
On Fri, May 12, 2017 at 7:14 PM, Tony Lindgren wrote: > From tony Mon Sep 17 00:00:00 2001 > From: Tony Lindgren > Date: Fri, 12 May 2017 08:47:57 -0700 > Subject: [PATCH] pinctrl: core: Fix warning by removing bogus code > > Andre Przywara noticed that we can get the > following warning with -

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-12 Thread André Przywara
On 12/05/17 18:14, Tony Lindgren wrote: > * Tony Lindgren [170512 08:39]: >> * Linus Walleij [170512 02:28]: >>> On Thu, May 11, 2017 at 4:20 PM, Andre Przywara >>> wrote: Linus, can you shed some light if this array creation serves some purpose? >>> >>> Tony [author of this function] can

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-12 Thread Tony Lindgren
* Tony Lindgren [170512 08:39]: > * Linus Walleij [170512 02:28]: > > On Thu, May 11, 2017 at 4:20 PM, Andre Przywara > > wrote: > > > Linus, can you shed some light if this array creation serves some purpose? > > > > Tony [author of this function] can you look at this? > > > > The code in pi

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-12 Thread Tony Lindgren
* Linus Walleij [170512 02:28]: > On Thu, May 11, 2017 at 4:20 PM, Andre Przywara > wrote: > >> On Thu, May 4, 2017 at 1:57 AM, Andre Przywara > >> wrote: > >> > >>> When a pinctrl driver gets interrupted during its probe process > >>> (returning -EPROBE_DEFER), the devres system cleans up all

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-12 Thread Linus Walleij
On Thu, May 11, 2017 at 4:20 PM, Andre Przywara wrote: >> On Thu, May 4, 2017 at 1:57 AM, Andre Przywara >> wrote: >> >>> When a pinctrl driver gets interrupted during its probe process >>> (returning -EPROBE_DEFER), the devres system cleans up all allocated >>> resources. During this process it

Re: [linux-sunxi] Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-11 Thread Icenowy Zheng
于 2017年5月11日 GMT+08:00 下午10:01:54, Linus Walleij 写到: >On Thu, May 4, 2017 at 1:57 AM, Andre Przywara >wrote: > >> When a pinctrl driver gets interrupted during its probe process >> (returning -EPROBE_DEFER), the devres system cleans up all allocated >> resources. During this process it calls >p

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-11 Thread Andre Przywara
Hi Linus, On 11/05/17 15:01, Linus Walleij wrote: > On Thu, May 4, 2017 at 1:57 AM, Andre Przywara wrote: > >> When a pinctrl driver gets interrupted during its probe process >> (returning -EPROBE_DEFER), the devres system cleans up all allocated >> resources. During this process it calls pinmux

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-11 Thread Tejun Heo
Hello, On Thu, May 11, 2017 at 03:20:58PM +0100, Andre Przywara wrote: > > Tejun, do I read your comments on the patch as an ACK? > > Tejun and I were wondering why we need this "create an array with the > indices" in the first place. If we can just call radix_tree_delete() > directly from the ra

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-11 Thread Linus Walleij
On Thu, May 4, 2017 at 1:57 AM, Andre Przywara wrote: > When a pinctrl driver gets interrupted during its probe process > (returning -EPROBE_DEFER), the devres system cleans up all allocated > resources. During this process it calls pinmux_generic_free_functions() > and pinctrl_generic_free_group

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-05 Thread Tejun Heo
Hello, Maxime. On Fri, May 05, 2017 at 09:55:18PM +0200, Maxime Ripard wrote: > > It doesn't make any sense to use the managed functions from the > > release functions and if you're always matching devm_kmalloc() with > > devm_kfree(), the only thing it'd do is confusing its readers. > > I wouldn

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-05 Thread Maxime Ripard
On Thu, May 04, 2017 at 12:00:32PM -0400, Tejun Heo wrote: > Hello, > > On Thu, May 04, 2017 at 02:03:14PM +0200, Maxime Ripard wrote: > > > @@ -704,6 +704,7 @@ static void pinctrl_generic_free_groups(struct > > > pinctrl_dev *pctldev) > > > radix_tree_delete(&pctldev->pin_group_tree, i

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-04 Thread André Przywara
On 04/05/17 17:00, Tejun Heo wrote: Hi, > Hello, > > On Thu, May 04, 2017 at 02:03:14PM +0200, Maxime Ripard wrote: >>> @@ -704,6 +704,7 @@ static void pinctrl_generic_free_groups(struct >>> pinctrl_dev *pctldev) >>> radix_tree_delete(&pctldev->pin_group_tree, indices[i]); >>>

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-04 Thread Tejun Heo
Hello, On Thu, May 04, 2017 at 02:03:14PM +0200, Maxime Ripard wrote: > > @@ -704,6 +704,7 @@ static void pinctrl_generic_free_groups(struct > > pinctrl_dev *pctldev) > > radix_tree_delete(&pctldev->pin_group_tree, indices[i]); > > devm_kfree(pctldev->dev, group); > >

Re: [PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-04 Thread Maxime Ripard
Hi Andre, On Thu, May 04, 2017 at 12:57:37AM +0100, Andre Przywara wrote: > When a pinctrl driver gets interrupted during its probe process > (returning -EPROBE_DEFER), the devres system cleans up all allocated > resources. During this process it calls pinmux_generic_free_functions() > and pinctrl

[PATCH] pinctrl: use non-devm kmalloc versions for free functions

2017-05-03 Thread Andre Przywara
When a pinctrl driver gets interrupted during its probe process (returning -EPROBE_DEFER), the devres system cleans up all allocated resources. During this process it calls pinmux_generic_free_functions() and pinctrl_generic_free_groups(), which in turn use managed kmalloc calls for temporarily all