From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 47AEEC43458 for ; Mon, 29 Jun 2026 16:23:22 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4gps5h74Vbz2yH4; Tue, 30 Jun 2026 02:23:20 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=198.175.65.17 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1782750200; cv=none; b=iBS9GzecFsW+hopb5hOQcmNPcGRGUKLPwGJbiMVeIgyetEdnHUvCXX6186BUoxwNVnq2hHf7tUATTNoFsU6wlqzk5PKvtC76j/vzvFQ5PaQvAABWtRzH/t9/XFDGMs2nM6WxgPBteArx9uqildIUy3tJp9e1pwp/T8w2WUcC2IfvK7mkm+TBGPz99Ax+5BmA0V+rmeSdi8OA5QWUuzq3fNQWpXm8NUkj9kStg/Uv9MsKreIjJlD+Nfgpmi3O8GX4O/P3jXBMvtnQrvYZFCNgG3sIDNGRCS8VZZBFyB89NQx5UK1i8eSEhhTd1X3WjIkTLpaeQd789HlDiewExAKHZQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1782750200; c=relaxed/relaxed; bh=XmMP3Fyn5t2fBCLhgeG0xrhOjF7olylXvaOhfkqQqqI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T5+h7l64Gdy/ozRn7xFN4KoDznicfeKOQt9YS/iWadZPpSwgLiBCtt4zlD1uG09X2stO4XYjWh8o+axFsJw8WG/LZme8hzbvRq9DUhU2VbbTPMsShd3Bq/bG3c7CbUvGL0U16c1Lcgy8KrAel83uWzL4YNBkNWR5fgdEBpnGduMwfd8yDEQaIAwuylzXazc7SHtrrfeC+LSbzcQxknFNDuyFpgBFARltzkxKaPb4Y2F9V938zuiBxndX3ZlkRuFetHps6UTP0FT72dalMHogk8cMvuKONWD348w0PZzN8ABFaVCKSr4eBkkhebnyxtePMbQYuXEm+pUialBfs+wdXw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=KidCTjNt; dkim-atps=neutral; spf=pass (client-ip=198.175.65.17; helo=mgamail.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.intel.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=KidCTjNt; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.intel.com (client-ip=198.175.65.17; helo=mgamail.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=lists.ozlabs.org) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4gps5g4gtJz2xd2 for ; Tue, 30 Jun 2026 02:23:19 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1782750200; x=1814286200; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=60Kkhn1S4xFp8KF1ZAF46WPmvC0pF6KOvaZqQh2Mlf4=; b=KidCTjNtEWIleRshxkpHesHi7jCfUKqRBBKWyWcVThN0GOBmZzyAKkmQ jdwjKnkyjtQAkA7PMtfT2v94io167/X/T1a+6xNvtSU8V8vwI8xyWhZ9Z Uy1zZgVnoBVMApF8dCJjQeeghDaoJFfxrYxLUm8sL38x2sb0c2mNGgIVL Zjm+KzdJgiBFOhwnNcVVvOM0MBOMC/6ezI43FvpEgB1UnXoy57g32GnGt 1mX+PgsArAigDD1qCLCxQoYcnRFSU/yZqH6uRacA9bsLoAAH3i5ZDvcqW rafRT8guX6bwiEkhkDDAdQouh7fBhQPX+wMnP71wSWOAvI14J8Vf7bTtP Q==; X-CSE-ConnectionGUID: 9PIqqWw7SmK1ynWEnIeXxw== X-CSE-MsgGUID: CC7haAbQSaW9fEb1+8mdmQ== X-IronPort-AV: E=McAfee;i="6800,10657,11832"; a="83476055" X-IronPort-AV: E=Sophos;i="6.24,232,1774335600"; d="scan'208";a="83476055" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2026 09:23:15 -0700 X-CSE-ConnectionGUID: tfo8W8J/QcSmRxl6mSfrug== X-CSE-MsgGUID: qa+c086/QemtMiZKLSzfAA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,232,1774335600"; d="scan'208";a="256920930" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.207]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2026 09:23:02 -0700 Date: Mon, 29 Jun 2026 19:23:00 +0300 From: Andy Shevchenko 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 , Greg Kroah-Hartman , Vinod Koul , "Rafael J. Wysocki" , Danilo Krummrich , Rob Herring , Saravana Kannan , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Andi Shyti , 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, stable@vger.kernel.org, Wolfram Sang Subject: Re: [PATCH v2 00/19] driver core: count references of the platform device's fwnode, not OF node Message-ID: References: <20260629-pdev-fwnode-ref-v2-0-8abe2513f96e@oss.qualcomm.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260629-pdev-fwnode-ref-v2-0-8abe2513f96e@oss.qualcomm.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Mon, Jun 29, 2026 at 11:12:23AM +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. Reviewed-by: Andy Shevchenko for patches 2-4 assuming they will be accompanied with patch 19 at the same time. -- With Best Regards, Andy Shevchenko