From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 C349221D3E4; Fri, 10 Jul 2026 14:09:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783692595; cv=none; b=rArj6CV8zmGKEd2KEMM3QjBXRXRz48DKrJ5LQPT+K2oAJVNoCWATGUzox2l54Bq/RwEZiXAVRSJgRY6aXrWgg6nYfCNtdZ+6Y9HHVZbRtnL6JKjeSut+iJHmU3AxqrT+9psMipjXaSioywBwPCn5LMQJeiQ49/ONpGUxkavFgHM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783692595; c=relaxed/simple; bh=JMhdtMOLaUHWXqPIXTzBNMeZuvaIhZXyYL/o5sxmfz4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ET7QZ2lPgo2Irw7+T/cf+sarPdA+1JVvm1kSlqHZpXOxHYZdeJM0fLrb3B6jf/9IkEAc/28VaBeynhgy2Z9NsVx/7HoZGr6y+ZcarB+p8MLOeaV5svY1SQ2qQE86VhlWiYXqj4+EwGy5Us9aMHcEnZ0qXmixTUNDRkGYp4Sq0Ug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kgmiif0J; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="kgmiif0J" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E7411F000E9; Fri, 10 Jul 2026 14:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783692593; bh=h1xi3IKQjbdJ53JCv2L+jzRlcSu7ApiSTvfpodjcvtk=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=kgmiif0JKq2HSeSzJ7OofwRSlUD94iS3uEV1tKQ943E0Dw5HJBa/NodJ+UjhAlKNH FGbXFGZ+JEAXY3Dr+tF4ssnWwH8WP2JApHQJxCeAynEVTGBtdWPwSFCDmJ7/fOYkFW Kncg2+p1T/D/wvPa/3glV7KVkw5wq6sn17XSngyM= Date: Fri, 10 Jul 2026 16:09:16 +0200 From: Greg Kroah-Hartman To: Bartosz Golaszewski Cc: Lee Jones , Mark Brown , Thierry Reding , Sebastian Hesselbarth , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Srinivas Kandagatla , Vinod Koul , "Rafael J. Wysocki" , Danilo Krummrich , Rob Herring , Saravana Kannan , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Andi Shyti , Andy Shevchenko , Joerg Roedel , Will Deacon , Robin Murphy , Doug Berger , Florian Fainelli , Broadcom internal kernel review list , Ulf Hansson , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Matthew Brost , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , Rodrigo Vivi , David Airlie , Simona Vetter , Peter Chen , Paul Cercueil , Bin Liu , Philipp Zabel , Maximilian Luz , Hans de Goede , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , Krzysztof Kozlowski , Benjamin Herrenschmidt , brgl@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, driver-core@lists.linux.dev, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-i2c@vger.kernel.org, iommu@lists.linux.dev, linux-pm@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-usb@vger.kernel.org, linux-mips@vger.kernel.org, platform-driver-x86@vger.kernel.org, mfd@lists.linux.dev, stable@vger.kernel.org, Manuel Ebner , Wolfram Sang , Konrad Dybcio Subject: Re: [PATCH v3 00/20] driver core: count references of the platform device's fwnode, not OF node Message-ID: <2026071001-limelight-stoppable-d7cb@gregkh> References: <20260706-pdev-fwnode-ref-v3-0-1ff028e33779@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-i2c@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260706-pdev-fwnode-ref-v3-0-1ff028e33779@oss.qualcomm.com> On Mon, Jul 06, 2026 at 02:44:12PM +0200, Bartosz Golaszewski wrote: > Platform device core provides helper interfaces for dealing with > dynamically created platform devices. Most users should use > platform_device_register_full() which encapsulates most of the > operations but some modules will want to use the split approach of > calling platform_device_alloc() + platform_device_add() separately for > various reasons. > > With many platform devices now using dynamic software nodes as their > primary firmware nodes and with the platform device interface being > extended to also better cover the use-cases of secondary software nodes, > I believe it makes sense to switch to counting the references of all > kinds of firmware nodes. > > To that end, I identified all users of platform_device_alloc() that also > assign dev.of_node or dev.fwnode manually. I noticed five cases where > the references are not increased as they should (patches 1-5 fix these > users) and provided three new functions in platform_device.h that now > become the preferred interfaces for assigning firmware nodes to dynamic > platform devices (in line with platform_device_add_data(), > platform_device_add_resources(), etc.). The bulk of the patches in this > series are small driver conversions to port all users to going through > the new functions that now encapsulate the refcount logic. With that > done, the final patch seamlessly switches to counting the references of > all firmware node types. > > This effort is prerequisite of removing platform_device_release_full() > and unifying the release path for dynamic platform devices using > unmanaged software nodes. > > Merging strategy: The entire series should go through the driver core > tree, possibly with an immutable branch provided to solve any potential > conflicts though these are rather unlikely. I've added this to the driver-core-testing branch now, thanks! greg k-h