linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	Scott Wood <oss@buserror.net>,
	Kumar Gala <galak@kernel.crashing.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] powerpc: make use of for_each_node_by_name() instead of open-coding it
Date: Tue, 31 Jan 2017 18:20:32 -0800	[thread overview]
Message-ID: <20170201022032.GB17308@dtor-ws> (raw)
In-Reply-To: <20170201015438.18826-1-dmitry.torokhov@gmail.com>

On Tue, Jan 31, 2017 at 05:54:37PM -0800, Dmitry Torokhov wrote:
> Instead of manually coding the loop with of_find_node_by_name(), let's
> switch to the standard macro for iterating over nodes with given name.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 +-
>  arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 +-
>  arch/powerpc/platforms/83xx/mpc836x_mds.c | 2 +-
>  arch/powerpc/platforms/cell/interrupt.c   | 3 +--
>  arch/powerpc/platforms/cell/setup.c       | 3 +--
>  arch/powerpc/platforms/cell/spider-pic.c  | 3 +--
>  arch/powerpc/platforms/powermac/feature.c | 2 +-
>  7 files changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> index bb7b25acf26f..1e92f806ee60 100644
> --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c
> +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c
> @@ -75,7 +75,7 @@ static void __init mpc832x_sys_setup_arch(void)
>  		par_io_init(np);
>  		of_node_put(np);
>  
> -		for (np = NULL; (np = of_find_node_by_name(np, "ucc")) != NULL;)
> +		for_each_node_by_name(np. "ucc")

Gah, kbuild robot even told me about this typo and I missed it. Please
let me know if you can fix up or if I should resend (or drop). I'd
rather it not get dropped as I want to convert of_find_node_by_name() to
stop dropping reference to the starting node, as half of the users do
not expect it.

Thanks.

-- 
Dmitry

  parent reply	other threads:[~2017-02-01  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01  1:54 [PATCH 1/2] powerpc: make use of for_each_node_by_name() instead of open-coding it Dmitry Torokhov
2017-02-01  1:54 ` [PATCH 2/2] powerpc: make use of for_each_node_by_type() " Dmitry Torokhov
2018-01-17 13:29   ` [2/2] " Michael Ellerman
2017-02-01  2:20 ` Dmitry Torokhov [this message]
2017-12-12 11:39 ` [1/2] powerpc: make use of for_each_node_by_name() " 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=20170201022032.GB17308@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=oss@buserror.net \
    --cc=paulus@samba.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 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).