[{"id":3669320,"web_url":"http://patchwork.ozlabs.org/comment/3669320/","msgid":"<20260325202037.GA1291636@bhelgaas>","list_archive_url":null,"date":"2026-03-25T20:20:37","subject":"Re: [PATCH v6 13/27] PCI: of: Remove fwnode_dev_initialized() call\n for a PCI root bridge node","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Wed, Mar 25, 2026 at 03:35:40PM +0100, Herve Codina wrote:\n> During the instantiation of devices described by a device-tree overlay\n> applied on a PCI device, devlink displays the following kind of debug\n> messages instead of creating the expected links:\n>    'Not linking xxxx - might never become dev'\n> \n> Without those expected links, the device removal order cannot be\n> correct.\n> \n> Those debug traces are printed by fw_devlink_create_devlink(). In our\n> use case, they are all printed because the supplier of the link has at\n> least one of its ancestor with its fwnode flag FWNODE_FLAG_INITIALIZED\n> set.\n> \n> The culprit ancestor is the PCI root bridge.\n> \n> The fwnode related to the PCI root bridge is created dynamically by the\n> of_pci_make_host_bridge_node() function. During this creation\n> fwnode_dev_initialized() is called which set the FWNODE_FLAG_INITIALIZED\n> flag.\n> \n> Calling fwnode_dev_initialized() tells devlink that the device related\n> to this node is handled out of the driver core. This is not correct in\n> our case. Indeed the device related to this firmware node is handled\n> using driver core mechanisms and is fully compliant devlink\n> expectations.\n> \n> Simply remove the fwnode_dev_initialized() call. With that done, the\n> devlink debug messages are no more displayed and links that were missing\n> are correctly created.\n> \n> Signed-off-by: Herve Codina <herve.codina@bootlin.com>\n\nI would ordinarily make sure the person who added\nfwnode_dev_initialized() here was ok with its removal, but it looks\nlike you added this with 1f340724419e (\"PCI: of: Create device tree\nPCI host bridge node\"), so I assume you're ok with removing it :)\n\nI suppose there could be a \"Fixes: 1f340724419e\" tag, but maybe\nthere's no need to backport this anywhere?\n\nAcked-by: Bjorn Helgaas <bhelgaas@google.com>\n\n> ---\n>  drivers/pci/of.c | 1 -\n>  1 file changed, 1 deletion(-)\n> \n> diff --git a/drivers/pci/of.c b/drivers/pci/of.c\n> index b694fcda16b1..0993257fe025 100644\n> --- a/drivers/pci/of.c\n> +++ b/drivers/pci/of.c\n> @@ -811,7 +811,6 @@ void of_pci_make_host_bridge_node(struct pci_host_bridge *bridge)\n>  \t */\n>  \tof_node_set_flag(np, OF_POPULATED);\n>  \tfw_devlink_set_device(&np->fwnode, &bridge->dev);\n> -\tfwnode_dev_initialized(&np->fwnode, true);\n>  \n>  \tret = of_changeset_apply(cset);\n>  \tif (ret)\n> -- \n> 2.53.0\n>","headers":{"Return-Path":"\n <linux-i2c+bounces-16783-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-i2c@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=R/sHWhQC;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16783-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"R/sHWhQC\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgz8D2fcbz1yGD\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 07:31:24 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 7D461310573A\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 20:20:43 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 5A3A9372683;\n\tWed, 25 Mar 2026 20:20:39 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E4EE83644D1;\n\tWed, 25 Mar 2026 20:20:38 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 469B9C4CEF7;\n\tWed, 25 Mar 2026 20:20:38 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774470039; cv=none;\n b=eybBcXhRxMxmPtn87BtN2tyZcMcdfxSZUt/3Vfh4OOjuGp65DIV2u0pfE6O8/JElhxGUPZWbN+VE+kgpMOocSSz+uj2NLdfs7/+hRyKUaLlNHBDZ48YuTqK1vet6nCutMXOs6JvvBjMhSR/1EDgQc3XpoF4m6mbAR1aOSS6hZyY=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774470039; c=relaxed/simple;\n\tbh=EJf9EH03K048GnQyciGn9nJ/4njlCY8sY9h7aSYy5jQ=;\n\th=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:\n\t Content-Disposition:In-Reply-To;\n b=d/hwnw7DXZ71R5AFbQeXXCrtvFgOKDmscmEvalotQF+3a31/4Ma6W+uZ9Qw+wCSvMBWMNpapeMzBt22kwDRMBsextEGh8G4w2MfQoWoEFcWtHyC2rZfeue+sMkjxFXxIAkj8x6on8EibsojxQ1FTYudKAy2gjaUoASKU56Lwwjg=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=R/sHWhQC; arc=none smtp.client-ip=10.30.226.201","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1774470038;\n\tbh=EJf9EH03K048GnQyciGn9nJ/4njlCY8sY9h7aSYy5jQ=;\n\th=Date:From:To:Cc:Subject:In-Reply-To:From;\n\tb=R/sHWhQCzYd+ZF4ClNbFtPpjz3TwD6fZXZ1sS0wPW8AqP3rl0tovUYaWdonKVWaiJ\n\t OwlrlLGPKyQJzjTcNTMD7KHdXAJOjy/Pgec4iK1sQUwsjoZifIZYI5uC0jTlzEGcLG\n\t 18viuyai68dZgzN8F87qzLT1SkxhJdMLTx9dm/6064TjKTmgnptwvlSI/XP/fcRtl4\n\t giL0rQUFbbUETMdG05uXbW4WH5fvuqaOMDFtm2P7I5VMCeTlaQAU4irvLB2JumoxMH\n\t 16eIDSTM+Evjf3AQNa1cthVdIu/mws4vSuaCZCJQTTLQFydtFozsiRGP5ZJm2cF9Ry\n\t tmA3OJZNW4eqw==","Date":"Wed, 25 Mar 2026 15:20:37 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Herve Codina <herve.codina@bootlin.com>","Cc":"Andrew Lunn <andrew@lunn.ch>, Rob Herring <robh@kernel.org>,\n\tKrzysztof Kozlowski <krzk+dt@kernel.org>,\n\tConor Dooley <conor+dt@kernel.org>,\n\tGeert Uytterhoeven <geert+renesas@glider.be>,\n\tKalle Niemi <kaleposti@gmail.com>,\n\tMatti Vaittinen <mazziesaccount@gmail.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"Rafael J. Wysocki\" <rafael@kernel.org>,\n\tDanilo Krummrich <dakr@kernel.org>, Frank Li <Frank.Li@nxp.com>,\n\tSascha Hauer <s.hauer@pengutronix.de>,\n\tPengutronix Kernel Team <kernel@pengutronix.de>,\n\tFabio Estevam <festevam@gmail.com>,\n\tMichael Turquette <mturquette@baylibre.com>,\n\tStephen Boyd <sboyd@kernel.org>, Andi Shyti <andi.shyti@kernel.org>,\n\tWolfram Sang <wsa+renesas@sang-engineering.com>,\n\tPeter Rosin <peda@axentia.se>, Arnd Bergmann <arnd@arndb.de>,\n\tSaravana Kannan <saravanak@kernel.org>,\n\tBjorn Helgaas <bhelgaas@google.com>,\n\tCharles Keepax <ckeepax@opensource.cirrus.com>,\n\tRichard Fitzgerald <rf@opensource.cirrus.com>,\n\tDavid Rhodes <david.rhodes@cirrus.com>,\n\tLinus Walleij <linusw@kernel.org>,\n\tUlf Hansson <ulf.hansson@linaro.org>,\n\tMark Brown <broonie@kernel.org>, Len Brown <lenb@kernel.org>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tDaniel Scally <djrscally@gmail.com>,\n\tHeikki Krogerus <heikki.krogerus@linux.intel.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tDavidlohr Bueso <dave@stgolabs.net>,\n\tJonathan Cameron <jonathan.cameron@huawei.com>,\n\tDave Jiang <dave.jiang@intel.com>,\n\tAlison Schofield <alison.schofield@intel.com>,\n\tVishal Verma <vishal.l.verma@intel.com>,\n\tIra Weiny <ira.weiny@intel.com>,\n\tDan Williams <dan.j.williams@intel.com>,\n\tShawn Guo <shawnguo@kernel.org>, Wolfram Sang <wsa@kernel.org>,\n\tlinux-kernel@vger.kernel.org, driver-core@lists.linux.dev,\n\timx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,\n\tlinux-clk@vger.kernel.org, linux-i2c@vger.kernel.org,\n\tdevicetree@vger.kernel.org, linux-pci@vger.kernel.org,\n\tlinux-sound@vger.kernel.org, patches@opensource.cirrus.com,\n\tlinux-gpio@vger.kernel.org, linux-pm@vger.kernel.org,\n\tlinux-spi@vger.kernel.org, linux-acpi@vger.kernel.org,\n\tlinux-cxl@vger.kernel.org,\n\tAllan Nielsen <allan.nielsen@microchip.com>,\n\tHoratiu Vultur <horatiu.vultur@microchip.com>,\n\tSteen Hegelund <steen.hegelund@microchip.com>,\n\tLuca Ceresoli <luca.ceresoli@bootlin.com>,\n\tThomas Petazzoni <thomas.petazzoni@bootlin.com>","Subject":"Re: [PATCH v6 13/27] PCI: of: Remove fwnode_dev_initialized() call\n for a PCI root bridge node","Message-ID":"<20260325202037.GA1291636@bhelgaas>","Precedence":"bulk","X-Mailing-List":"linux-i2c@vger.kernel.org","List-Id":"<linux-i2c.vger.kernel.org>","List-Subscribe":"<mailto:linux-i2c+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-i2c+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20260325143555.451852-14-herve.codina@bootlin.com>"}}]