linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powpc:feature: of_node_put is not needed after iterator.
@ 2018-08-04 14:25 zhong jiang
  2018-08-04 20:37 ` Tyrel Datwyler
  2018-08-08 14:26 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: zhong jiang @ 2018-08-04 14:25 UTC (permalink / raw)
  To: benh; +Cc: paulus, mpe, linuxppc-dev, linux-kernel

for_each_node_by_name iterators only  exit normally when the loop
cursor is NULL, So there is no point to call of_node_put.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 arch/powerpc/platforms/powermac/feature.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 3f82cb2..4eb8cb3 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -2889,10 +2889,8 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
 	/* On all machines, switch modem & serial ports off */
 	for_each_node_by_name(np, "ch-a")
 		initial_serial_shutdown(np);
-	of_node_put(np);
 	for_each_node_by_name(np, "ch-b")
 		initial_serial_shutdown(np);
-	of_node_put(np);
 }
 
 void __init
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] powpc:feature: of_node_put is not needed after iterator.
  2018-08-04 14:25 [PATCH] powpc:feature: of_node_put is not needed after iterator zhong jiang
@ 2018-08-04 20:37 ` Tyrel Datwyler
  2018-08-08 14:26 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Tyrel Datwyler @ 2018-08-04 20:37 UTC (permalink / raw)
  To: zhong jiang, benh; +Cc: paulus, linuxppc-dev, linux-kernel

On 08/04/2018 07:25 AM, zhong jiang wrote:
> for_each_node_by_name iterators only  exit normally when the loop
> cursor is NULL, So there is no point to call of_node_put.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

> ---
>  arch/powerpc/platforms/powermac/feature.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
> index 3f82cb2..4eb8cb3 100644
> --- a/arch/powerpc/platforms/powermac/feature.c
> +++ b/arch/powerpc/platforms/powermac/feature.c
> @@ -2889,10 +2889,8 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
>  	/* On all machines, switch modem & serial ports off */
>  	for_each_node_by_name(np, "ch-a")
>  		initial_serial_shutdown(np);
> -	of_node_put(np);
>  	for_each_node_by_name(np, "ch-b")
>  		initial_serial_shutdown(np);
> -	of_node_put(np);
>  }
> 
>  void __init
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: powpc:feature: of_node_put is not needed after iterator.
  2018-08-04 14:25 [PATCH] powpc:feature: of_node_put is not needed after iterator zhong jiang
  2018-08-04 20:37 ` Tyrel Datwyler
@ 2018-08-08 14:26 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2018-08-08 14:26 UTC (permalink / raw)
  To: zhong jiang, benh; +Cc: paulus, linuxppc-dev, linux-kernel

On Sat, 2018-08-04 at 14:25:00 UTC, zhong jiang wrote:
> for_each_node_by_name iterators only  exit normally when the loop
> cursor is NULL, So there is no point to call of_node_put.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/81d7b08b3cec79a43411e7175401b3

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-08 14:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-04 14:25 [PATCH] powpc:feature: of_node_put is not needed after iterator zhong jiang
2018-08-04 20:37 ` Tyrel Datwyler
2018-08-08 14:26 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).