Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] serial: pmac_zilog: use for_each_child_of_node() macro
@ 2020-09-16  6:21 Qinglang Miao
  2020-09-24 12:27 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Qinglang Miao @ 2020-09-16  6:21 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Michael Ellerman,
	Benjamin Herrenschmidt, Paul Mackerras
  Cc: linux-serial, linuxppc-dev, linux-kernel, Qinglang Miao

Use for_each_child_of_node() macro instead of open coding it.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/tty/serial/pmac_zilog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 96e7aa479..063484b22 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -1644,7 +1644,7 @@ static int __init pmz_probe(void)
 		 * TODO: Add routines with proper locking to do that...
 		 */
 		node_a = node_b = NULL;
-		for (np = NULL; (np = of_get_next_child(node_p, np)) != NULL;) {
+		for_each_child_of_node(node_p, np) {
 			if (of_node_name_prefix(np, "ch-a"))
 				node_a = of_node_get(np);
 			else if (of_node_name_prefix(np, "ch-b"))
-- 
2.23.0


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

* Re: [PATCH -next] serial: pmac_zilog: use for_each_child_of_node() macro
  2020-09-16  6:21 [PATCH -next] serial: pmac_zilog: use for_each_child_of_node() macro Qinglang Miao
@ 2020-09-24 12:27 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2020-09-24 12:27 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
	Greg Kroah-Hartman, Jiri Slaby, Qinglang Miao
  Cc: linux-serial, linux-kernel, linuxppc-dev

On Wed, 16 Sep 2020 14:21:38 +0800, Qinglang Miao wrote:
> Use for_each_child_of_node() macro instead of open coding it.

Applied to powerpc/next.

[1/1] serial: pmac_zilog: use for_each_child_of_node() macro
      https://git.kernel.org/powerpc/c/1d42e07e9c249b7a032fba82b673ee8a8d6bd7b7

cheers

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16  6:21 [PATCH -next] serial: pmac_zilog: use for_each_child_of_node() macro Qinglang Miao
2020-09-24 12:27 ` Michael Ellerman

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git