Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-27 Thread Kishon Vijay Abraham I
+Grant Hi, On Tuesday 17 November 2015 07:08 AM, Brian Norris wrote: > On Mon, Nov 16, 2015 at 12:33:14PM +0100, Julia Lawall wrote: >> for_each_available_child_of_node performs an of_node_get on each iteration, >> so a return from the middle of the loop requires an of_node_put. >> >> A

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-27 Thread Kishon Vijay Abraham I
+Grant Hi, On Tuesday 17 November 2015 07:08 AM, Brian Norris wrote: > On Mon, Nov 16, 2015 at 12:33:14PM +0100, Julia Lawall wrote: >> for_each_available_child_of_node performs an of_node_get on each iteration, >> so a return from the middle of the loop requires an of_node_put. >> >> A

Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-19 Thread Russell King - ARM Linux
On Thu, Nov 19, 2015 at 12:44:11PM -0600, Rob Herring wrote: > On Wed, Nov 18, 2015 at 1:05 PM, Brian Norris > wrote: > > (changing subject, add devicet...@vger.kernel.org) > > > > On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: > >> On Tue, 17 Nov 2015, Brian Norris wrote: > >> >

Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-19 Thread Rob Herring
On Wed, Nov 18, 2015 at 1:05 PM, Brian Norris wrote: > (changing subject, add devicet...@vger.kernel.org) > > On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: >> On Tue, 17 Nov 2015, Brian Norris wrote: >> > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: >> > > Is this

Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-19 Thread Rob Herring
On Wed, Nov 18, 2015 at 1:05 PM, Brian Norris wrote: > (changing subject, add devicet...@vger.kernel.org) > > On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: >> On Tue, 17 Nov 2015, Brian Norris wrote: >> > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia

Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-19 Thread Russell King - ARM Linux
On Thu, Nov 19, 2015 at 12:44:11PM -0600, Rob Herring wrote: > On Wed, Nov 18, 2015 at 1:05 PM, Brian Norris > wrote: > > (changing subject, add devicet...@vger.kernel.org) > > > > On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: > >> On Tue, 17 Nov 2015,

Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-18 Thread Julia Lawall
On Wed, 18 Nov 2015, Brian Norris wrote: > (changing subject, add devicet...@vger.kernel.org) > > On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: > > On Tue, 17 Nov 2015, Brian Norris wrote: > > > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > > > > Is this

device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-18 Thread Brian Norris
(changing subject, add devicet...@vger.kernel.org) On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: > On Tue, 17 Nov 2015, Brian Norris wrote: > > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > > > Is this something that should be checked for elsewhere? > > > > I

device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-18 Thread Brian Norris
(changing subject, add devicet...@vger.kernel.org) On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: > On Tue, 17 Nov 2015, Brian Norris wrote: > > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > > > Is this something that should be checked for elsewhere? > > > > I

Re: device_node lifetime (was: Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put)

2015-11-18 Thread Julia Lawall
On Wed, 18 Nov 2015, Brian Norris wrote: > (changing subject, add devicet...@vger.kernel.org) > > On Tue, Nov 17, 2015 at 11:33:25PM +0100, Julia Lawall wrote: > > On Tue, 17 Nov 2015, Brian Norris wrote: > > > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > > > > Is this

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Julia Lawall
On Tue, 17 Nov 2015, Brian Norris wrote: > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > > On Tue, 17 Nov 2015, Brian Norris wrote: > > > On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > > > > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > > diff --git

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Brian Norris
On Tue, Nov 17, 2015 at 10:30:36AM -0800, Brian Norris wrote: > I expect the same sort of problem shows up plenty of other places. I > don't think many people use CONFIG_OF_DYNAMIC, so the effects of these > failures probably aren't felt by many. Also, there's a quite-relevant todo item in

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Brian Norris
On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > On Tue, 17 Nov 2015, Brian Norris wrote: > > On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > > > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c > > > >

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Julia Lawall
On Tue, 17 Nov 2015, Brian Norris wrote: > On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > > > This reminds me of a potential problem I'm looking at in other > > > subsystems: from code reading (I haven't seen any issues in

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Brian Norris
On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > This reminds me of a potential problem I'm looking at in other > > subsystems: from code reading (I haven't seen any issues in practice, > > probably because I don't use OF_DYNAMIC) it

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Brian Norris
On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > On Tue, 17 Nov 2015, Brian Norris wrote: > > On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > > > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c > > > >

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Brian Norris
On Tue, Nov 17, 2015 at 10:30:36AM -0800, Brian Norris wrote: > I expect the same sort of problem shows up plenty of other places. I > don't think many people use CONFIG_OF_DYNAMIC, so the effects of these > failures probably aren't felt by many. Also, there's a quite-relevant todo item in

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Brian Norris
On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > This reminds me of a potential problem I'm looking at in other > > subsystems: from code reading (I haven't seen any issues in practice, > > probably because I don't use OF_DYNAMIC) it

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Julia Lawall
On Tue, 17 Nov 2015, Brian Norris wrote: > On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > > > This reminds me of a potential problem I'm looking at in other > > > subsystems: from code reading (I haven't seen any issues in

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-17 Thread Julia Lawall
On Tue, 17 Nov 2015, Brian Norris wrote: > On Tue, Nov 17, 2015 at 06:48:39PM +0100, Julia Lawall wrote: > > On Tue, 17 Nov 2015, Brian Norris wrote: > > > On Tue, Nov 17, 2015 at 07:12:22AM +0100, Julia Lawall wrote: > > > > On Mon, 16 Nov 2015, Brian Norris wrote: > > > > > diff --git

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-16 Thread Julia Lawall
On Mon, 16 Nov 2015, Brian Norris wrote: > On Mon, Nov 16, 2015 at 12:33:14PM +0100, Julia Lawall wrote: > > for_each_available_child_of_node performs an of_node_get on each iteration, > > so a return from the middle of the loop requires an of_node_put. > > > > A simplified version of the

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-16 Thread Brian Norris
On Mon, Nov 16, 2015 at 12:33:14PM +0100, Julia Lawall wrote: > for_each_available_child_of_node performs an of_node_get on each iteration, > so a return from the middle of the loop requires an of_node_put. > > A simplified version of the semantic patch that finds this problem is as > follows

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-16 Thread Brian Norris
On Mon, Nov 16, 2015 at 12:33:14PM +0100, Julia Lawall wrote: > for_each_available_child_of_node performs an of_node_get on each iteration, > so a return from the middle of the loop requires an of_node_put. > > A simplified version of the semantic patch that finds this problem is as > follows

Re: [PATCH 1/7] phy: brcmstb-sata: add missing of_node_put

2015-11-16 Thread Julia Lawall
On Mon, 16 Nov 2015, Brian Norris wrote: > On Mon, Nov 16, 2015 at 12:33:14PM +0100, Julia Lawall wrote: > > for_each_available_child_of_node performs an of_node_get on each iteration, > > so a return from the middle of the loop requires an of_node_put. > > > > A simplified version of the