Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp979323rbd; Fri, 23 Feb 2024 09:14:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW8wFVHNcf5FtosuIPeMxaSw6AtoiDkZLITKAv5XAVqybzqsgJCNE5zApfjFO5V4OU2K7UaItj+luESffVobfFqc7R97UFOlWROd3Dj3w== X-Google-Smtp-Source: AGHT+IH6XtnddMcvdYTCL+J+5hxoELugT3hF+21x5E+5h9f98nUP+Frw0MTjO0VggOqYXqYJObP0 X-Received: by 2002:a62:d119:0:b0:6e4:59aa:93a2 with SMTP id z25-20020a62d119000000b006e459aa93a2mr390054pfg.2.1708708458622; Fri, 23 Feb 2024 09:14:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708708458; cv=pass; d=google.com; s=arc-20160816; b=LoylEZ1nE8bJXbTv9arP6PXaRkfFgqscJrInMKhSdwoJiTVWyrAqYTWfBjHvt1iD5u s0JesveFzuHJkzM243GurkBxW0bcFW2pdPRzT9cIEap5N0by/y+20zwvXPF3oawpsiD5 L/QmFBOkBtcjnaXbx8+Wk/Rs93jE8pZ7eIbddZPvJlu48tHw4E4nx6xlR5NEUhGEJqxt llsfahft+Mi3TwVywYjjVyV43JAZjcDlBxIBJomjuLIOTWOu56cG4y7LbwPE+2LVCVQC pmOUps9bRNqTQ1R3Wmr/dHDqrCDccoO2V6ojbhfzmnEpwfUDn4HYbVg+s3Rd0uJawTPC IEvw== 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:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=85pDP4zsxAwhMCtNlslsOKu7MD+TMUDaekG6RJWUt2A=; fh=kAWe/uQPllO5aKBCyS8zsrTjDHKXD8FAGCs4bKB+so8=; b=UC5Xpd+JnqRsJkqwJOl89GHjbQYFjyhpW39dq7EbgMuyPIcP+k0EqaK2OaLbfGYkD6 3aF35lXRom5LgC1XYE00a3x6VPtyptp+s3ZQe72kcCa0nuJmx7x0FQCFq0ggY5v0visL yTb+2Hap49re/p/qa3RKnHqyQlkCYub7tdhgm1x5ENkfeCu86plyERGg0SyyjmcvXiO0 5usbhdejkWbzlJFAmfDv3f+GOX0ObO+m1+rOXW9DZIK4o6wsn3etREjLfP+AiVqbmYdW j9ibgwfjGB7chwzuNsWKBTBkK+nzBSQWe07p5bQqI53AUNAlSySjdbm2ii3e7bMn1esb ZaXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-78806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n27-20020aa7985b000000b006e471c6365dsi8357356pfq.27.2024.02.23.09.14.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 09:14:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-78806-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78806-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 579F3287AE4 for ; Fri, 23 Feb 2024 17:14:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BDC713DBAD; Fri, 23 Feb 2024 17:12:40 +0000 (UTC) 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 7C84D13A863; Fri, 23 Feb 2024 17:12:37 +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=1708708359; cv=none; b=SX600kba1/tUWHuWhsoCrw6a5180BoEG8yWbSqwday2f9stlFwu5cWAfsUSJP323Z3AuUn79NbhpxuES6REc6TNZEA/r7u4GbQYtO685Pd5zgl0TezeOtKyDCkcxZsD+u6hmvifFHnU5VvsC8uMQksO3bERlzxAlUYuUXYIc5vg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708708359; c=relaxed/simple; bh=omVfxmJ5d0K2yC1GRTrc2kykKRrP0QiZLn0MqUh5wF4=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GdrpZsO/wj4Pb1gj46PeT+d9kGi8tWa6QRwb2wcDKc2IjOprKYEiYEGL16Tt+KCcDAvo4pNHm05lZCh81gf+mCqKqXPZ/lE1qD52go6XikKyGfNwZuynqtQ+bXTluz1c5/LvlpOPZHUk8bBBlINwKLdCoXVfZ6+Gjz7qIugB8dk= 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 4ThGgF35Tnz6K5tk; Sat, 24 Feb 2024 01:08:25 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 211CD140F0B; Sat, 24 Feb 2024 01:12:35 +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 17:12:34 +0000 Date: Fri, 23 Feb 2024 17:12:33 +0000 From: Jonathan Cameron To: Julia Lawall CC: Andy Shevchenko , , Rob Herring , Frank Rowand , , Peter Zijlstra , Greg Kroah-Hartman , Subject: Re: [PATCH v2 0/4] of: automate of_node_put() - new approach to loops. Message-ID: <20240223171233.000069bd@Huawei.com> In-Reply-To: <3ced0f8-fe6c-a2f4-f7c4-79ecc7c308d@inria.fr> References: <20240223124432.26443-1-Jonathan.Cameron@huawei.com> <20240223163602.0000697a@Huawei.com> <3ced0f8-fe6c-a2f4-f7c4-79ecc7c308d@inria.fr> 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: lhrpeml100006.china.huawei.com (7.191.160.224) To lhrpeml500005.china.huawei.com (7.191.163.240) On Fri, 23 Feb 2024 17:38:31 +0100 (CET) Julia Lawall wrote: > 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. Question I was addressing was a few lines up. "Or do we have more outside of IIO?" I should have addressed it immediately after the question + not sent half an answer :( > > julia