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 12E18C3DA7F for ; Mon, 5 Aug 2024 20:59:51 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DG7fL1SViAvHuVco1qSP2sxAdOBHX0n0JKhTs8UGbLA=; b=sYXXw6MVuFCK5CzrEs0LzN2IIE CKovKYoCRWxqSBJMorOJV7NMF9L3F5T/XUYrdzKRpalHjv7Sjd9V4jYMNJALcTxf5jdd9S7lYIf3P F0zo+gDHCADViiL2wwZMSMqNH0Z/pqzcCYe7quoh7qFp9MeIc4Ae0CUayoFlsmBrg4wv0/sg+aTq/ ylkTsQ444SD+nsjrkcC7sdV2naBMdU7pLyhMQVjru8W2Ggd/QfxbU0flNkjf7c6uu7bQUbqaj2ekS MMRkfcYGGAShrlcvUaDjcIwOx/omM0ddBLNYEpueiBtJYxbVdmiAWsUVhhg8ycGHoUK0LiACJsLbe ZodBpG/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb4nm-0000000HGLh-374l; Mon, 05 Aug 2024 20:59:34 +0000 Received: from mgamail.intel.com ([192.198.163.18]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb4nF-0000000HGGf-1bZd for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2024 20:59:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722891541; x=1754427541; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gjFRACIVY4CZs0fF0gBdmou29vCbYimp5bxsEMOmmUU=; b=GpcKPj1qykJVd7GcYN3wgAliAscgJXNXuU1xkEd8GwhgFyUGRcYPd7dc ikcsuVZEl/QBUek0KKtNh0JvfHCKflgR6mSlBIwYd5FXExCzPYlUhZJGW 4bUTPFkGSaj+rv3IV8nTHe02b2DGoPwz1KLDz98Pdtg3u7g7GqSssDYvj P6AvIl7w+cz+3kUr9r5ymwUxeFR0LPKftVoiIleRSPZDBSQFyyNbV9nEA 62uYjbmDr9u6a4XJLxw02ut7gnUgMtAJt+n1/tcbxJxqaw3ek0iTrxOxJ RiLAS+Wi/Y+6UUT01XuOEvotviJroMSpL2kDeUihJBODHEZ9/urkLL+0o g==; X-CSE-ConnectionGUID: 2ZjU1VygR2WJNYtp6sYtBg== X-CSE-MsgGUID: b0pyGcEWSE+4bUPeaiTZYA== X-IronPort-AV: E=McAfee;i="6700,10204,11155"; a="20458757" X-IronPort-AV: E=Sophos;i="6.09,265,1716274800"; d="scan'208";a="20458757" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2024 13:58:56 -0700 X-CSE-ConnectionGUID: Hj3XyW2lRdOhBw/BJAV74Q== X-CSE-MsgGUID: Zt7l1uQRQwi5QRrZTwNguA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,265,1716274800"; d="scan'208";a="56198727" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2024 13:58:51 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id 9C17411F965; Mon, 5 Aug 2024 23:58:48 +0300 (EEST) Date: Mon, 5 Aug 2024 20:58:48 +0000 From: Sakari Ailus To: Javier Carrasco Cc: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Michael Hennerich , Lars-Peter Clausen , Jonathan Cameron , Anand Ashok Dumbre , Michal Simek , Pavel Machek , Lee Jones , 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 Subject: Re: [PATCH 4/4] leds: as3645a: use device_* to iterate over device child nodes Message-ID: References: <20240801-device_child_node_access-v1-0-ddfa21bef6f2@gmail.com> <20240801-device_child_node_access-v1-4-ddfa21bef6f2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240801-device_child_node_access-v1-4-ddfa21bef6f2@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_135901_456812_EB6F7EEE X-CRM114-Status: GOOD ( 10.82 ) 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 Thu, Aug 01, 2024 at 08:13:53AM +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. > > Signed-off-by: Javier Carrasco Thanks! Acked-by: Sakari Ailus -- Sakari Ailus