lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240829063347.69818-1-linruifeng4@huawei.com>
Date: Thu, 29 Aug 2024 14:33:47 +0800
From: Lin Ruifeng <linruifeng4@...wei.com>
To: <johannes@...solutions.net>, <perex@...ex.cz>, <tiwai@...e.com>
CC: <linuxppc-dev@...ts.ozlabs.org>, <alsa-devel@...a-project.org>,
	<linux-sound@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] aoa: core: Using helper function for_each_child_of_node()

Helper function for_each_child_of_node() can iterate
through the DT node, so we don't need to use while loop.

Signed-off-by: Lin Ruifeng <linruifeng4@...wei.com>
---
 sound/aoa/core/gpio-feature.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/aoa/core/gpio-feature.c b/sound/aoa/core/gpio-feature.c
index 39bb409b27f6..01060f7c3862 100644
--- a/sound/aoa/core/gpio-feature.c
+++ b/sound/aoa/core/gpio-feature.c
@@ -72,7 +72,7 @@ static struct device_node *get_gpio(char *name,
 		gpio = of_find_node_by_name(NULL, "gpio");
 		if (!gpio)
 			return NULL;
-		while ((np = of_get_next_child(gpio, np))) {
+		for_each_child_of_node(gpio, np) {
 			audio_gpio = of_get_property(np, "audio-gpio", NULL);
 			if (!audio_gpio)
 				continue;
-- 
2.17.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ