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 4E396C3DA4A for ; Thu, 22 Aug 2024 13:38:35 +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:Date:Message-Id:Subject:References:In-Reply-To:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=495OTBELKqvUIE8WwvkV3pGtaqFmslkz57bGHq1Vvcw=; b=H7HZ3crImjw4XVqFJkI5gM5Kx9 6Ueiu8mDuFQm+ZjgGGtUtoIvT1HTBb0Rk3uchbj21ZlowTSFbtkhY85ccpJ3VGmVa1BW87AHdkmA7 81L/8DnF2nKdQhWnOcqIqC7ONOHCV0VeSEtLEPtZZ6xfSZR4SpAxrHvfnNJqmYRSUQ0L2/fay321x wtuy+wjX1R/rmdhf1KYCGcAgmA+qYT5DoMJkEzFTkEGMvgyTUnhEv8fJG056Kctcg4ZK0sVrrLf8P fQdETVfgxGk/nuwqn2j53yn+J7l+a3+Ijdt8KzGme1yfd4xnFWf4c3syUy1ABp48LB3WE08jfP/hV ZYFLQBmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh81D-0000000Cz4D-0NXZ; Thu, 22 Aug 2024 13:38:27 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh7zk-0000000Cyr9-32Cu for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 13:36:58 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 21467CE0FE7; Thu, 22 Aug 2024 13:36:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC2D3C32782; Thu, 22 Aug 2024 13:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724333814; bh=BgJ/l3mLoRCmwuPasSyagHjNSTpSdxRXrQBy8TafvrY=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=a/BPo3ZxjQoZHELA1xASGiCDPMFsQ+/njjHcPiKgKEx9xhANryJCun1aXaAvP75x3 OaASKC0dJbaeombrq1i/HZsjNqi+6uwdqNX0jE0V3GwDjjE5XVofgcHlK0UPYBuxuw 5raa7jTuOkLpOjaj4s3c42LWilBe2O54a9S0MD/Mjm+p2kHIFI6ZzPYs2IOjaFfxKw rm9LXKYCT2tEjdD6y/GMc91Qzw11JeZMcy/cbF0KNp1cM9I/GQl7+BO6pdO6xxVic/ iKfvPw6pUwjN5oYIMz67jKLvpTGJtcX1E80ymuLBxlzAwSoF10ppyoIAyePyh/mc72 ctvLM9tH+w/iw== From: Lee Jones To: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Michael Hennerich , Lars-Peter Clausen , Jonathan Cameron , Anand Ashok Dumbre , Michal Simek , Sakari Ailus , Pavel Machek , Lee Jones , Javier Carrasco Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-leds@vger.kernel.org In-Reply-To: <20240820-device_child_node_access-v3-2-1ee09bdedb9e@gmail.com> References: <20240820-device_child_node_access-v3-0-1ee09bdedb9e@gmail.com> <20240820-device_child_node_access-v3-2-1ee09bdedb9e@gmail.com> Subject: Re: (subset) [PATCH v3 2/2] leds: as3645a: use device_* to iterate over device child nodes Message-Id: <172433381069.1325598.16630400730677266254.b4-ty@kernel.org> Date: Thu, 22 Aug 2024 14:36:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_063657_363135_BF1B987C X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. 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 Tue, 20 Aug 2024 21:02:27 +0200, Javier Carrasco wrote: > Drop the manual access to the fwnode of the device to iterate over its > child nodes. `device_for_each_child_node` macro provides direct access > to the child nodes, and given that the `child` variable is only required > within the loop, the scoped variant of the macro can be used. > > Use the `device_for_each_child_node_scoped` macro to iterate over the > direct child nodes of the device. > > [...] Applied, thanks! [2/2] leds: as3645a: use device_* to iterate over device child nodes commit: 1041e1d4f061e65a3c47cff34709864293f07284 -- Lee Jones [李琼斯]