From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C36C1C47BDF for ; Tue, 6 Jan 2026 10:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:CC:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RPktYUhL8dq/Qfmo71IZceXt7DDBZATodRE6QZLbjHI=; b=UjoMKzCY3yt1E8VgSNF93FqtTA AI5VqLzGWA5AvUPxvjqXlxTNKseROPIL29AGLymSTzmZeOPhNE+45sEfWfifknoph2Ox1KTen9Z9X xaF6t/p2qg7I5dmdFCLl+/Fu85f3wQhrhVoMmbKRvK2p2bjX0J+emBTdE5aG6KD8DwX+zmu4fjRaQ 6q0Nwzl4RcW0QgDi38WAfBBiJ4wgJRR71OlkDCWmDXc8xX4zwVi12YfYBv1cdD7logMMeEfJlmlZP EMKNShUK19YqTCsY9LxQFje9GDq60P7S4Txr8biNuvnTUdTiAnYz1tGEnh7MUy0qCGe+sgGdHJw+g 8EVmk8eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vd4EE-0000000CmwI-2G42; Tue, 06 Jan 2026 10:23:54 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vd4EB-0000000CmvM-1bBX for linux-arm-kernel@lists.infradead.org; Tue, 06 Jan 2026 10:23:53 +0000 Received: from mail.maildlp.com (unknown [172.18.224.107]) by frasgout.his.huawei.com (SkyGuard) with ESMTPS id 4dlnM661F0zJ4703; Tue, 6 Jan 2026 18:23:46 +0800 (CST) Received: from dubpeml100005.china.huawei.com (unknown [7.214.146.113]) by mail.maildlp.com (Postfix) with ESMTPS id 3D53640570; Tue, 6 Jan 2026 18:23:48 +0800 (CST) Received: from localhost (10.48.149.114) by dubpeml100005.china.huawei.com (7.214.146.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Tue, 6 Jan 2026 10:23:45 +0000 Date: Tue, 6 Jan 2026 10:23:44 +0000 From: Jonathan Cameron To: Krzysztof Kozlowski CC: Miguel Ojeda , Rob Herring , "Saravana Kannan" , Nathan Chancellor , "Nick Desaulniers" , Bill Wendling , Justin Stitt , Russell King , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Krzysztof Kozlowski , "Alim Akhtar" , Madhavan Srinivasan , Michael Ellerman , "Nicholas Piggin" , "Christophe Leroy (CS GROUP)" , Nipun Gupta , Nikhil Agarwal , Abel Vesa , Peng Fan , Michael Turquette , "Stephen Boyd" , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Vinod Koul , Sylwester Nawrocki , Mauro Carvalho Chehab , "Rafael J. Wysocki" , Viresh Kumar , , , , , , , , , , , Subject: Re: [PATCH 08/11] clk: imx: imx31: Simplify with scoped for each OF child loop Message-ID: <20260106102344.00003201@huawei.com> In-Reply-To: <20260105-of-for-each-compatible-scoped-v1-8-24e99c177164@oss.qualcomm.com> References: <20260105-of-for-each-compatible-scoped-v1-0-24e99c177164@oss.qualcomm.com> <20260105-of-for-each-compatible-scoped-v1-8-24e99c177164@oss.qualcomm.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.48.149.114] X-ClientProxiedBy: lhrpeml100010.china.huawei.com (7.191.174.197) To dubpeml100005.china.huawei.com (7.214.146.113) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260106_022351_707355_63F74518 X-CRM114-Status: GOOD ( 17.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 05 Jan 2026 14:33:46 +0100 Krzysztof Kozlowski wrote: > Use scoped for-each loop when iterating over device nodes to make code a > bit simpler. > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jonathan Cameron I guess this is papering over similar compatibility issues with old DT as the previous one (so fsl,imx-osc26m which may or may not have fallback compatible to fixed-clock). Jonathan > > --- > > Depends on first patch. > --- > drivers/clk/imx/clk-imx31.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/clk/imx/clk-imx31.c b/drivers/clk/imx/clk-imx31.c > index 4c8d9ff0b2ad..962eccac63ce 100644 > --- a/drivers/clk/imx/clk-imx31.c > +++ b/drivers/clk/imx/clk-imx31.c > @@ -123,18 +123,15 @@ static void __init _mx31_clocks_init(void __iomem *base, unsigned long fref) > > static void __init mx31_clocks_init_dt(struct device_node *np) > { > - struct device_node *osc_np; > u32 fref = 26000000; /* default */ > void __iomem *ccm; > > - for_each_compatible_node(osc_np, NULL, "fixed-clock") { > + for_each_compatible_node_scoped(osc_np, NULL, "fixed-clock") { > if (!of_device_is_compatible(osc_np, "fsl,imx-osc26m")) > continue; > > - if (!of_property_read_u32(osc_np, "clock-frequency", &fref)) { > - of_node_put(osc_np); > + if (!of_property_read_u32(osc_np, "clock-frequency", &fref)) > break; > - } > } > > ccm = of_iomap(np, 0); >