Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp958633rbd; Fri, 23 Feb 2024 08:40:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXKITI5CRd5KxzGb//tbUSEezCLjMGRpzy++Rg0VNmREgKFEjuqkuC33CTjKcxQLvz3wojpIiMD6mZ+1Nho3G+Y7trvGtZCjuZh2yqvDQ== X-Google-Smtp-Source: AGHT+IHEBGfIoISJlE446Z7TiPv7ltLkjqCymnHLowlvVAZ+to9/xdwXjurXPbhp7DpiIFv4I1uW X-Received: by 2002:a17:906:6701:b0:a3e:d7fe:4c4d with SMTP id a1-20020a170906670100b00a3ed7fe4c4dmr206060ejp.57.1708706400528; Fri, 23 Feb 2024 08:40:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708706400; cv=pass; d=google.com; s=arc-20160816; b=pMzWzWfarVH6PhOZxYZ8Z2LksRvrOO1ls9DYwlRl89VqFAv3z7s+KS1Faee8P83qSK CbBrlE85s7I17MwocD0UuY+NpFWE8MJpPp2Pdq8j0UIVunQNPi+LtyVwbN0ZQx5g926y 2iYcFzyLK3X3SLhVxmcavpOdBEi4XTX2UUgW9vIYhSah4JMZwDEOietN640r2DzwNGXr rYwDezgdcp0QdgC4o5NBggSn1Cv4G91nbLY8VYOOlnZMAGR3scYm5hivoVHW+7/Q1qtl bIm4qjqsgFJ1PTtgILiKlJrTNR/AwbGJqcSDTH4AamNOfA0nrKDJy4VNJE+p+0PSZje4 iuqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=WlaWiwvIFPdrrOg3qAWisrb28vfZjwD7loFQzxqh5Tk=; fh=AHgyayww04YstLEBxmJfCz3nOkM3CrIxsGbw1UjNG4I=; b=rTlhY05ABWd+xwbHJpi3c2NNDi+7JtSDt1hsyLPzAxtqEdAYkdUJMjYjBdh08upjOa R6YZrYikzClRJKCB98Sf2nreAM0wJRxoexNU87wpTFsUrkkRXn41g0c+fcv0h+Ti8hv/ gKTbReOfBmlcYydmvvPlgL6xlDqiJxJdVF30dFtcSwRBJ6x7DSc4T/juYGHO8mhitRZe LD9yBA8j3a8oEWk9vR5AKUMV1sJxO6F9JdORbFMCJ8GT7Xr0pOgqHeLDWqAp+6nktrE3 PuyL1IES4ug7YpTg3n/z1Ik/jqNw04Ggo5BFZxmfhdNjSU3GECQrxKVDigYi1AMx/fD4 fxDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=cPSpGPfb; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-78744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f20-20020a1709062c5400b00a3e42cc90d2si5605984ejh.58.2024.02.23.08.40.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:40:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=cPSpGPfb; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-78744-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78744-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4AC961F2441F for ; Fri, 23 Feb 2024 16:40:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58C141292DF; Fri, 23 Feb 2024 16:39:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="cPSpGPfb" Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (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 98197186A; Fri, 23 Feb 2024 16:39:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.134.164.83 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708706386; cv=none; b=r8YDiwDFKOKaTRvU8CtAfD8ZYTFVNOE7lR/CktYY2ar59CtHOBQroYklhpPYff89iUxLk3o7kmFaA87OxbqjwsZ6wSgUJLe/5wZog6eybrnVUTQEXUsiJKe676sKjfScE0XCUtz0blHGRzZ4PgBQRFsbfiIUTQtyfJFhybaflAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708706386; c=relaxed/simple; bh=Eyyd4fCCeFKmwaKN8igGEeVJ7NSJ0KckQXwkQZvFZZY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=nAhrtZSnLD5aTPqi313nV8lGc6rFgpqxc0inmzFfZNWk9kT+uAlZEF7VQKEyFM6ya0qG/7LkWWtljRCetmApZaUDq/BtyKbJSoW3t471pLl8zyCss7LCKMSaVywm6a3SaPpmaINaNr37JxghPB1ljM19r5ojBtHU/fDar+m9oDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr; spf=pass smtp.mailfrom=inria.fr; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b=cPSpGPfb; arc=none smtp.client-ip=192.134.164.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=WlaWiwvIFPdrrOg3qAWisrb28vfZjwD7loFQzxqh5Tk=; b=cPSpGPfbqpKVl5lyqr2tHFFAlw7VD9HTotQGtr07yvfFT/zfBpXt/yRC AE2n6inNv5DJ5fiklDfA5VzkVoc4khupoM/Y8RW5EP16xeQHqFzaQUljN 4kpTjRjhDpvbVmFED0xoekmxJMdyGOAO4LVP6sWHQNJN2lgJvkhQqtze6 Q=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.06,180,1705359600"; d="scan'208";a="153524982" Received: from wifi-eduroam-85-082.paris.inria.fr ([128.93.85.82]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 17:38:32 +0100 Date: Fri, 23 Feb 2024 17:38:31 +0100 (CET) From: Julia Lawall To: Jonathan Cameron cc: Andy Shevchenko , linux-iio@vger.kernel.org, Rob Herring , Frank Rowand , linux-kernel@vger.kernel.org, Peter Zijlstra , Greg Kroah-Hartman , marek.vasut@gmail.com Subject: Re: [PATCH v2 0/4] of: automate of_node_put() - new approach to loops. In-Reply-To: <20240223163602.0000697a@Huawei.com> Message-ID: <3ced0f8-fe6c-a2f4-f7c4-79ecc7c308d@inria.fr> References: <20240223124432.26443-1-Jonathan.Cameron@huawei.com> <20240223163602.0000697a@Huawei.com> 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 On Fri, 23 Feb 2024, Jonathan Cameron wrote: > On Fri, 23 Feb 2024 17:52:46 +0200 > Andy Shevchenko wrote: > > > On Fri, Feb 23, 2024 at 12:44:28PM +0000, Jonathan Cameron wrote: > > > The equivalent device_for_each_child_node_scoped() series for > > > fwnode will be queued up in IIO for the merge window shortly as > > > it has gathered sufficient tags. Hopefully the precdent set there > > > for the approach will reassure people that instantiating the > > > child variable inside the macro definition is the best approach. > > > https://lore.kernel.org/linux-iio/20240217164249.921878-1-jic23@kernel.org/ > > > > > > v2: Andy suggested most of the original converted set should move to > > > generic fwnode / property.h handling. Within IIO that was > > > a reasonable observation given we've been trying to move away from > > > firmware specific handling for some time. Patches making that change > > > to appropriate drivers posted. > > > As we discussed there are cases which are not suitable for such > > > conversion and this infrastructure still provides clear benefits > > > for them. > > > > > iio: adc: rcar-gyroadc: use for_each_available_child_node_scoped() > > > > Is this the only one so far? Or do we have more outside of IIO? > > > > I'm fine with the code if OF maintainers think it's useful. > > My concern is to make as many as possible drivers to be converted to > > use fwnode instead of OF one. > > > Julia wrote a coccinelle script > __free() cases > https://lore.kernel.org/all/alpine.DEB.2.22.394.2401291455430.8649@hadrien/ The script doesn't use fwnode. It gets rid of of_node_put, asssuming that someone has already set that up for __free. julia