Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1152976rdb; Fri, 16 Feb 2024 07:00:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxUnCmyEQdjqjOyzlRrP9kk3svCQJEqP/b/F1R+XekwBEfmhayE3GcRDFEwZbvsaZ/DOQcyDNSLnJ1G0Ecdew2KMEm5fC/Lv8Bxhe0Ow== X-Google-Smtp-Source: AGHT+IHn+a7p9h2v2UOD1l3aG5cu9CgtPxSpSDXY269pkDeBUN8zkLYByJrtv+MtUCRrh24ttdFZ X-Received: by 2002:a05:6a20:e68c:b0:19e:44c9:cdd4 with SMTP id mz12-20020a056a20e68c00b0019e44c9cdd4mr5621496pzb.14.1708095637401; Fri, 16 Feb 2024 07:00:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708095637; cv=pass; d=google.com; s=arc-20160816; b=B4HiyWyHvUO3J+MF0RWzhkkr6N7dyBOBt7q5jW+tjffDZAHdj3Hz7W8WHFKjtSi7Zd Cg05+9245JVs2191NZeDiSlEEzRgsI+n01hYz8vLO8fX3pCAM32gYBRmvugEI4jdPC1N SicMuJX7EarjIT224f8/MyVIsTl/ZclNq5ROcKBwpRRyIiiFodkwWoWDGHc413cSK+0E hbqQsO6QeuNQYpxBRuIAAQvYmFg0Xfo7L3rXg18KdXwmQ4UHlqezmKh0qr4kMOqLNm0H jEnL47RGr9UxKBGMQuLiyH391CE7fs0yjoowma7KRxOG30qaFI2lSZkbunjLK6qOHZ5s XNWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=FUn6nZuV2B15KedeqB5+IYvFlv6G8CEwz5/XNzUvjRk=; fh=YySQ0x2Y8CVyhX2LOC+qp0ukBvI45ij1FWHnvkJ8zgs=; b=wM6nP64pjZiXacfM2/qrjltIfDYBejkLKOjXSzVgqaha+4qpycXfxG20IIE6UC+y8j MlHVRHCWadv+u9aDxBrkuqqtU4wgtnd2qIb3H7eRMFaiXt2+NKAKg8xDPR/iFiqHvxii WD25pLMnJJZYYR9lBj5OC2BTRCW317d8eNkiq9pS7UC87M3wVcPLHK43MwI/kRstlDBl 1uymxEWTRMaNI6iw4tD4gNNQPEF5B3mKmsrnbiaUX5qsGfjFseKGkbZGfKtWm9dPvvgm sK47CDhKDKumx0c8BW/xii2g12ZRnvTAlT3aDLYxJJl71guOGW7+RmtCNA7l7GoWHy3l QYiw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hw5R7ZNz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68761-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id c16-20020a056a000ad000b006e04eba5d03si29223pfl.283.2024.02.16.07.00.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:00:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68761-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hw5R7ZNz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68761-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EC468B2344F for ; Fri, 16 Feb 2024 14:48:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCBA712F388; Fri, 16 Feb 2024 14:48:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Hw5R7ZNz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BD5912C812; Fri, 16 Feb 2024 14:48:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708094890; cv=none; b=oE4ijALqkqMZyw8lrbdj7fMhN5GlU5sRfWc+VuNRwGyQQYx/ThxRSKqzDJbklnxBRSST3oso/q87tcb2B1xVosBKftCBW0LA9+hTxC3SmjL3UklNQsENSB4XZDK4A01K4+NLglI9OfAbd8lqY2abdQQfET0rXnjuYzcV6UZVzRw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708094890; c=relaxed/simple; bh=K44i2DqBgPJ7hcROlXOpw2GUYsBOzblxH4exPmx/m7E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ONBqVHW/DqBTgAb+9pgLQfd4fBGFRZ3dEwWhyOzTxc4kgSavuX5ZX13N+362l43p5IajLi1KJRr9zvzhDBhvs4exXwfK/fpePKkgHaanM52K+RQPj2UTtPP9oOwkOV0YF/nfqLEsea2OocZqgaWeJfc+NSNkQCAZsP9uNCxl+Zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hw5R7ZNz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D5DDC43390; Fri, 16 Feb 2024 14:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708094889; bh=K44i2DqBgPJ7hcROlXOpw2GUYsBOzblxH4exPmx/m7E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Hw5R7ZNzL50e0lBhiiS4QmPuoshCVtH+ucSgCFvn47Y5tjgLFdjUdbjXiqra+RPKo jVYfVOb1H6GaR71LhkJT2hkZ1ieMdGraTZqeTXQ4XetOsMqdVH5r7O0pBSwgfRoqvi MnNMnUEGEKIItwy+zSb0wALsa2UcIBYontsLC5XxmV/stSJg5eQ/8Nl+2qcOBK1ZaP ZaOhAVOp5F1HdBlWW8rpyjfNv16VtV+j9QvFJCLJ30jq1eiCFgd0lfBlBH/9sbTWmm pJ9mnHYq8+YMCbdkvkFaY++VjtI1FAmrK0MoLiV4jsxYmxrN69xxfPL6GsSP8BIITz 7E8VO1cRbYB/Q== Date: Fri, 16 Feb 2024 14:47:56 +0000 From: Jonathan Cameron To: Andy Shevchenko Cc: linux-iio@vger.kernel.org, Rob Herring , Frank Rowand , linux-kernel@vger.kernel.org, Julia Lawall , Peter Zijlstra , Nicolas Palix , Sumera Priyadarsini , "Rafael J . Wysocki" , Len Brown , linux-acpi@vger.kernel.org, Greg Kroah-Hartman , Nuno =?UTF-8?B?U8Oh?= , Jonathan Cameron Subject: Re: [PATCH 0/8] of: automate of_node_put() - new approach to loops. Message-ID: <20240216144756.08e25894@jic23-huawei> In-Reply-To: References: <20240211174237.182947-1-jic23@kernel.org> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 12 Feb 2024 14:03:29 +0200 Andy Shevchenko wrote: > On Sun, Feb 11, 2024 at 05:42:28PM +0000, Jonathan Cameron wrote: > > From: Jonathan Cameron > > > > Since RFC: > > - Provide a for_each_available_child_of_node_scoped() variant and > > use that whenever we aren't specifically trying to include disabled > > nodes. > > - Fix the for_each_child_of_node_scoped() to not use a mix of > > _available_ and other calls. > > - Include a few more examples. The last one is there to show that > > not all uses of the __free(device_node) call are due to the loops. > > I'm a bit skeptical about need of this work. What I would prefer to see > is getting rid of OF-centric drivers in IIO. With that, we would need > only fwnode part to be properly implemented. > To be honest main reason for doing of first was that they have unit tests :) The IIO drivers were more of a proving ground than cases I really cared out cleaning up. However I'm always of the view that better to make some improvement now than wait for a perfect improvement later. However one or two are not going to be converted to fwnode handling any time soon because they make use of phandle based referencing for driver specific hook ups that isn't going to get generic handling any time soon. I'll probably focus on getting the fwnode version of this moving forwards first though and 'maybe' convert a few of the easier ones of these over to that framework to reduce how many users of this we end up with in IIO. Jonathan