linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
To: zhong jiang <zhongjiang@huawei.com>, benh@kernel.crashing.org
Cc: paulus@samba.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powpc:feature: of_node_put is not needed after iterator.
Date: Sat, 4 Aug 2018 13:37:39 -0700	[thread overview]
Message-ID: <eb06cfd4-ccbd-3f7f-2118-10f385d9b217@linux.vnet.ibm.com> (raw)
In-Reply-To: <1533392700-24621-1-git-send-email-zhongjiang@huawei.com>

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
> 

  reply	other threads:[~2018-08-04 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2018-08-08 14:26 ` Michael Ellerman

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=eb06cfd4-ccbd-3f7f-2118-10f385d9b217@linux.vnet.ibm.com \
    --to=tyreld@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=zhongjiang@huawei.com \
    /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 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).