From patchwork Wed Feb 5 16:09:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13961489 X-Patchwork-Delegate: kuba@kernel.org Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [195.130.132.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8322193436 for ; Wed, 5 Feb 2025 16:10:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.132.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738771804; cv=none; b=tXzkVfSDZgnvq9chRxpagfvWKIHzWDtf8/Ifnm17EFL79bWaWpSRlSZyAlBgn3wMxtKj/WYcgY0r7z2ISLv8SLaFelYif5MXymSxF3iupXbwYacMNF8iE9EiMU8cEmj/NM3y/hzuVr0ch8HVLcrqg6aL30stBwGlICvgvpiEMFc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738771804; c=relaxed/simple; bh=gP5Jx/RTaGVadp6ITV3o7rEpXX0n34qFkAHj15QpqYo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZwjZFd3NEOYQvovRhLI7NkEZX+p7RfbrmMcjdWGEyrjXvPzO/KjwjQVdOrF6/iCIYYq8VtRyh1/CIZQHMA+LNva8yIjH6Yi9FmaauzlxW+hktY6OMYvHpXleu3wi4Fk/8RxKYsAW7xs6te6AL3ZFPrXvogFvuhQheiW9a3ZIHzE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.132.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:fa11:c14e:2df5:5273]) by baptiste.telenet-ops.be with cmsmtp id 9s9r2E00V3f221S01s9rqQ; Wed, 05 Feb 2025 17:09:54 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.97) (envelope-from ) id 1tfhy7-0000000FwpE-1tNH; Wed, 05 Feb 2025 17:09:51 +0100 Received: from geert by rox.of.borg with local (Exim 4.97) (envelope-from ) id 1tfhyJ-00000006dgE-25U5; Wed, 05 Feb 2025 17:09:51 +0100 From: Geert Uytterhoeven To: =?utf-8?b?Q2zDqW1lbnQgTMOpZ2Vy?= , Wolfram Sang , Andrew Lunn , Heiner Kallweit , Russell King , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper Date: Wed, 5 Feb 2025 17:09:47 +0100 Message-ID: <3e394d4cf8204bcf17b184bfda474085aa8ed0dd.1738771631.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Simplify miic_parse_dt() by using the for_each_available_child_of_node() helper instead of manually skipping unavailable child nodes. Signed-off-by: Geert Uytterhoeven --- drivers/net/pcs/pcs-rzn1-miic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c index 74a1c28ffc014796..991f05a40c758ccd 100644 --- a/drivers/net/pcs/pcs-rzn1-miic.c +++ b/drivers/net/pcs/pcs-rzn1-miic.c @@ -472,13 +472,10 @@ static int miic_parse_dt(struct device *dev, u32 *mode_cfg) if (of_property_read_u32(np, "renesas,miic-switch-portin", &conf) == 0) dt_val[0] = conf; - for_each_child_of_node(np, conv) { + for_each_available_child_of_node(np, conv) { if (of_property_read_u32(conv, "reg", &port)) continue; - if (!of_device_is_available(conv)) - continue; - if (of_property_read_u32(conv, "renesas,miic-input", &conf) == 0) dt_val[port] = conf; }