From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 3B3A4225B2; Fri, 23 Feb 2024 16:36:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708706171; cv=none; b=lK0DHeJtfoHVxf6+foV86MS1KZ0aEafJGHmi65VmNzds7+VK+2YO5kh2mEIG23Rgx9JBd7qQnvnu8ZzBJfN5mu7YnHvyXQeYU2scR3ynKxwUBjb/HNxNZbYMY5RzVsatL5BSKC0XkUUeIgO8dT4x0KOz7cmk3gtIBiHaoJNPWpY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708706171; c=relaxed/simple; bh=dQSTCloNuCD1M/qTYmRW9k91SmlqmulGEqBgtxwoOcA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YeqdlvtYFEAl8ozP3VQOXxXw6E0M6Ii0RD6GPxKAwTkSpEeEZ1+9jKmVGeQAb64P2Qh3GHSkg0JcnBaK+m7zptdtHWK+Oy57zRfp8WHOx0ypUArQAXOL6ytl/ZRu+dk1k17pJG0dNxUDv22eqEghHfcV9Wwrs+cZhCv7HYUVZkI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4ThFsj0zS9z6K8xp; Sat, 24 Feb 2024 00:32:25 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 5A49A140594; Sat, 24 Feb 2024 00:36:04 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 23 Feb 2024 16:36:03 +0000 Date: Fri, 23 Feb 2024 16:36:02 +0000 From: Jonathan Cameron To: Andy Shevchenko CC: , Rob Herring , Frank Rowand , , Julia Lawall , Peter Zijlstra , "Greg Kroah-Hartman" , Subject: Re: [PATCH v2 0/4] of: automate of_node_put() - new approach to loops. Message-ID: <20240223163602.0000697a@Huawei.com> In-Reply-To: References: <20240223124432.26443-1-Jonathan.Cameron@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) 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 X-ClientProxiedBy: lhrpeml100004.china.huawei.com (7.191.162.219) To lhrpeml500005.china.huawei.com (7.191.163.240) 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/