From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.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 960F7421A00; Mon, 11 May 2026 15:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515196; cv=none; b=F74XYcSl5wEiIorI8OuPV4m+EGGdDs6iSRBq5nEnViQ5v7Ff1q5UDMtIXanO89o5HC5rkhewEa1GafUSXocLFNk3KNe39bd5/ogh2rVogjkcM9a0u/uknw5n0I52T+Es4uLq+s+o4BeOzhyBRjeXjkVC6KlZhEiPiARL18Ed7yA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515196; c=relaxed/simple; bh=9T6d48zs1lIV0cAfUwtluuThpEgqckHkXZXXTvpB0YI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jwSnxKbgFJTnuQTkbhGXPPSkfQSwbKY5LE/+Ga3iXLk6Lb3D6FVcKU7eLMUwFEFF2/OFik9CMalMwBlOO5IJuCAqWqZ1cQ3JTMg1wVhUD42VlRFhUxn9Tu0zcw8GWv/doysT4/P4TcaTg0p585nquZAAM5j5h9DXfdNV0I8/7xw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=fwZbLaiX; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fwZbLaiX" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 5CA571A1DD5; Mon, 11 May 2026 15:59:54 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 2755B60646; Mon, 11 May 2026 15:59:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 50DB211AF9F19; Mon, 11 May 2026 17:59:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515191; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=QT95uKzWmkWEnMHykChFdJG4E8h1yrEGdroGJWx2gEk=; b=fwZbLaiXpbQpHWB93OxEwFMDt2cz0YtwTuzG6AJ9alJuDUXN0qC/AxqFSTJ+40USk05mdR X+sZxyONkDcIF5HRjcBj4VamIwTIUgYPnM5bkwgIJmpzdOC/givwqdZ9HvEz2h+76S/lQA InmYmFPYlcnsKE8NLD6LlvOX87IrRuFFKM39NsoysP02wbMTI9hc4E07zkU9F5iKvylkMv BZyj1blTfTjw+n+nvJJNOZmTy4jLhOSN6A6tDJ0ujECGKZL77qyuxAdKHkTVXbpHFofjEK 4UGEne6u+VfAg5jn+susazT2iry8Y08SlrZxGWIe2gfL6JH9/mELUqC35wVxlw== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , stable@vger.kernel.org, Ulf Hansson Subject: [PATCH v7 1/8] driver core: fw_devlink: Introduce fw_devlink_set_device() Date: Mon, 11 May 2026 17:59:21 +0200 Message-ID: <20260511155930.34604-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Setting fwnode->dev is specific to fw_devlink. In order to avoid having a direct 'fwnode->dev =3D dev;' in several place in the kernel, introduce fw_devlink_set_device() helper to perform this operation. Having this helper allows to hide the fwnode devlink related stuff behind the helper. Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Ulf Hansson Reviewed-by: Charles Keepax --- Cc stable because used by other patches with Fixes + Cc stable --- include/linux/fwnode.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/fwnode.h b/include/linux/fwnode.h index 80b38fbf2121..b005bd78a379 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -252,4 +252,10 @@ void fwnode_links_purge(struct fwnode_handle *fwnode); void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode); bool fw_devlink_is_strict(void); =20 +static inline void fw_devlink_set_device(struct fwnode_handle *fwnode, + struct device *dev) +{ + fwnode->dev =3D dev; +} + #endif --=20 2.54.0 From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 1DC8A425CF6; Mon, 11 May 2026 16:00:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515205; cv=none; b=dc4RMrsF6gMfw7QKLUgci9TmRRk2hUtS+EwvgEcFmjo2C8iJUDN9LACpuzHFA3f4W7JbH0ZEtOoEpm8gqQG8TjOA+TFuMkF+ERVxBZiutePOkikaM6wt/RzsgTF7EdyrVBPIIGBPcDAn5TtkNXvUmLmnpwvHGb4Oz/Fj8ffUZf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515205; c=relaxed/simple; bh=/XvRviTCSin2LUKs7yMbKa4zISIWmVGD9lbA+HJpyZM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kPKaxdsOsKeiM6glmNnZ+lXAiSrR45UOppfz8mTt2/XjeiyokOp6h9YM8PiEVD7kiP0kdoHEvKFzuWaAGijny/35UaqdtDWdN98OfKkBoejUEkZq03TUH4Hx8C9kkx+AsrJZKQzpWVEyypJU0s52Yv7KMeAbrmxYzhfENe3q+Jw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=NJhItOyl; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="NJhItOyl" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 6E094C5E14B; Mon, 11 May 2026 16:00:52 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CF1E260646; Mon, 11 May 2026 16:00:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0BC3411AF9E9C; Mon, 11 May 2026 17:59:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515198; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=eLso7qwKwUfCrw/iPEq5uoZWKKfHhCJUIGRDgunoGhI=; b=NJhItOylrAiwDkCzbHOBzVRzh3USUjbhaP0ErMZje3yNJKKe0sOtMd+M0qFpIPrqoxNQK3 oMbSPSJgEsqCGf7RA6qn6e4yR2fasJxS+xLqYUZH5RG2T1T3iYqnWnQ0k2r1Ksu1KtIhLb ML7H5nViITBQ/DKItODI/B7Yn/o0Mt7eEtmYXHQ6+KXkpuRA49tg1FJIW85OYqOu+YieWa yqqTXjCPiW/zgDGPWo2YHJAvsNmWltB/Nefokjo1izepLlPpPNzyAlIQI9IJ8HdOEc5g7J +oS+dp9j3z2gJrUj+Y3c/YCHFX6+FI/rgisaU0rR7DaQDvwrDCvD55s80TcexQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , Ulf Hansson Subject: [PATCH v7 2/8] drivers: core: Use fw_devlink_set_device() Date: Mon, 11 May 2026 17:59:22 +0200 Message-ID: <20260511155930.34604-3-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode->dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Ulf Hansson --- drivers/base/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index bd2ddf2aab50..5c9a34aaefe1 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3684,7 +3684,7 @@ int device_add(struct device *dev) * device and the driver sync_state callback is called for this device. */ if (dev->fwnode && !dev->fwnode->dev) { - dev->fwnode->dev =3D dev; + fw_devlink_set_device(dev->fwnode, dev); fw_devlink_link_device(dev); } =20 @@ -3859,7 +3859,7 @@ void device_del(struct device *dev) device_unlock(dev); =20 if (dev->fwnode && dev->fwnode->dev =3D=3D dev) - dev->fwnode->dev =3D NULL; + fw_devlink_set_device(dev->fwnode, NULL); =20 /* Notify clients of device removal. This call must come * before dpm_sysfs_remove(). --=20 2.54.0 From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.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 EE86E425CEE; Mon, 11 May 2026 16:00:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515211; cv=none; b=Ih040/Ojk9+nos4+5Ams6uonwHq3kd1iHDyBYuFiq4lUwTZfgJKDEAhpvO8SWWiws9vWiN/j810bkzYXuJlmOojinB4ADJmO2iwUoi5HM/1MMC2GH02Plr0ce4K1XmqDNZYUXjbXJ+6W7p9W99Edse8de0fHYxhEYsWSOqQJ+O4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515211; c=relaxed/simple; bh=zpdk36n5HrbrFLRZnCwrGrsjiykxJvX7oeWKYz+zGlk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G8IvAX66xh84qZmdtcXha4Dfb4M4Js2UT1Gh40PCwkaqooToPTCX4pHM4wksH0vtJn/J3Um4JhL9bzq82ebUHaemDlwtZryH+QIRGwE/+aRhi1ekmXL+0JEOoEZfWZW0qTElvDhFgVVpK/i6ruBbtVXDxv2jN40omXUyICagYQY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Mx5H3NHC; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Mx5H3NHC" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id AA5E71A1DD5; Mon, 11 May 2026 16:00:08 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7A80660646; Mon, 11 May 2026 16:00:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id CC37911AF9F2B; Mon, 11 May 2026 17:59:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515206; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=KoFpBg6NGGhXCttfV1Vi2LRsu0Y5pOlFpJRPmpmGV1c=; b=Mx5H3NHCtRDwv4hJBVrmezVDE3qXjxOHc3HS03SmGuOhkvkwuTCGUdDquRUnV01DXdPGa7 g7ITJ46JMOf7R1+c/sqCB6n6pSwiBI6D+8LoXR9/QS42KyaPMD80CUaPYl0kTU8htdlbSu rVIp+pJl+XSzBldTc1o0FxbdH0sIJFobTcilvfQHcEjZeZN4aaQ8prybCbjJz9iyQYz0Pg CIFbeWsaz+yM+cF6G69r58b8eMgvaigl/4LK37hI+DoT1+w09WGmtHT/tO6leySKhNNKzE c4yHvD4Fsh2ovc2cXc0lqg+mWgJlTwXUAQu56lMd5JnApXp2H7iawNkI7O3LLw== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v7 3/8] pinctrl: cs42l43: Use fw_devlink_set_device() Date: Mon, 11 May 2026 17:59:23 +0200 Message-ID: <20260511155930.34604-4-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode->dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Reviewed-by: Charles Keepax Acked-by: Linus Walleij --- drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cir= rus/pinctrl-cs42l43.c index 227c37c360e1..47f2873034ce 100644 --- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c +++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c @@ -578,7 +578,7 @@ static int cs42l43_pin_probe(struct platform_device *pd= ev) return ret; =20 if (!child->dev) - child->dev =3D priv->dev; + fw_devlink_set_device(child, priv->dev); fwnode =3D child; } } --=20 2.54.0 From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.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 622E52ECD32; Mon, 11 May 2026 16:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515219; cv=none; b=GexT9v2UYfzJNPKYOQd/Xat4F0WN/vrODnvB+v07L41Zyvp3bn/rDTq9vfS8NhS4keJh6duYzsmmJrXofhvSKCu/wO/bVu3OHZ7uCCag2a5FD/FMPtJxbfjilJrCPfFhE0p/vdb8XdyahhTG2BzysvZ8cM93hJrXBYpYRdnWg0Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515219; c=relaxed/simple; bh=z1EvalsnnfnJHKLvlZT48/h0ZvCkmPErGXxEfvQ8g6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iuU2x6mMj/HCiI8P3T+XYK8S6xr6CUQhf1yIL2UmV2JRRGhR1W8WwWoH9AV6sdlrbFEBjzYlLMojadjcv7gzOI1bBI9XpGvtU0181NhDby2pTArmUUw4rsbeVjIeFmKg87Iju74/Q1QME2WEssKf/2Sgxl6xWWWg+1Eb4IVWhcw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=kLm9SUVR; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="kLm9SUVR" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 47E7A1A1DD5; Mon, 11 May 2026 16:00:17 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 17CDD60646; Mon, 11 May 2026 16:00:17 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4667011AF9F28; Mon, 11 May 2026 18:00:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515215; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=qdWWHNQ2gehGkV3uXL1v/9pUo5+SlY+b61bf1o7T3v8=; b=kLm9SUVRsjtkX7Jx9ffSpiPNoLl2pTYrfbCuMrXQu51nlvYyOSmKS+C5miC8hXx/KUZJuq pT5wL4ZgpA3W42RieVSbpTbyH9kqE0g/1DxLSpd/BIQkxVdlSMkSG8Ai0TvxYX4krsTalO tFSa5gMztiFG3RFDjfjyWMv1RrcoGwrCr0m+4IM0HQ8XvxMF7E5cTI7aeqxtElWdKdtdpz P4rHfkiQ9EC+jxwVe6Cbv/s8AANSFmvag6ZV5Xp0c9L9Oj5F8iS+H9VqwL88ZEwIp9STqz 6SId7kfXYUPcarqnLm1XaQwkmtjS3cvQ7ZLcikiTpN4AK7Ufp2D3FYXWxLNu2A== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , Jonathan Cameron Subject: [PATCH v7 4/8] cxl/test: Use device_set_node() Date: Mon, 11 May 2026 17:59:24 +0200 Message-ID: <20260511155930.34604-5-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly dev->fwnode. Use the dedicated helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Andy Shevchenko --- tools/testing/cxl/test/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c index 418669927fb0..2fdf8c0eca10 100644 --- a/tools/testing/cxl/test/cxl.c +++ b/tools/testing/cxl/test/cxl.c @@ -1515,7 +1515,7 @@ static void mock_companion(struct acpi_device *adev, = struct device *dev) { device_initialize(&adev->dev); fwnode_init(&adev->fwnode, NULL); - dev->fwnode =3D &adev->fwnode; + device_set_node(dev, &adev->fwnode); adev->fwnode.dev =3D dev; } =20 --=20 2.54.0 From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 1461641C31D; Mon, 11 May 2026 16:00:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515225; cv=none; b=If5Xs10KFKcIIqB0zmqbvDiYQrc/PC7ICttlyyWi4AS+pHBEET9hvcPz5VBy7WKwnPpT1JraMjM6+QvHcze4XOnAZ637kcvTe5b51ebfWqed2BQtcp8LHfsGqLoQ34rxttd/Qa23pdhnf+yul1QAhRlIJ/DXtfQbsDuL7wuB5Lg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515225; c=relaxed/simple; bh=XUWvCkoAnUyMK4tGjyBt9ZcONb8hLWQy64O2gAYY33s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sjzHr7INGUjc3KyffSx/IXroukKkXOK+eRZnZxAiA2fEhvVTRlM9WGRfYq1u/47cGmST04IHkBsJJDSsKZgWVEDGCGB568XErPpPEwnWXl/JXtfvCTru/EAteaXMs8p+uPHdEYo3dDrmYC0Ndm2JRySI2GOnII0hyorZm+tX5Rs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=VsTqFQF4; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="VsTqFQF4" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 7BCE7C5E154; Mon, 11 May 2026 16:01:12 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E0E6760646; Mon, 11 May 2026 16:00:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B25D611AF9F19; Mon, 11 May 2026 18:00:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515220; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=2qLmBPzMvY1Nji5IhEh9xcC0D2bttHi9TI4ANRnDPTE=; b=VsTqFQF42WJO367yULMUNxbELM8Zz/nQvv4CavNsGwN7x/67dsUTxkoxSw2FDX/azovHc4 ZVnX3SROWQvDsoFvIazRu2TSkIa38yzXsUfPiyo9G7OCcNMF03+DjMWj8TYjfKl/Qr0Ck6 a79MA8A9ICXn/5RW3wuEezboqNVgZlZwJ59ttGNjOoBHuSmGxA7LehfFxfKMoWO/+egKK4 Tl693dSp5yfW50UJphZVmG4IFbesOyYrOeaeQk5S2+kSzQFK+BKproeF5C3BeUCw/HtWI4 uOgkTucQfk5Y/0hybGchjeXVtH2OBXCZ1YOO7M6XVxFCe+pMbeWYrtZ2tP55lg== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , Jonathan Cameron Subject: [PATCH v7 5/8] cxl/test: Use fw_devlink_set_device() Date: Mon, 11 May 2026 17:59:25 +0200 Message-ID: <20260511155930.34604-6-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode.dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Signed-off-by: Herve Codina Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Andy Shevchenko --- tools/testing/cxl/test/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c index 2fdf8c0eca10..4c33b85dc846 100644 --- a/tools/testing/cxl/test/cxl.c +++ b/tools/testing/cxl/test/cxl.c @@ -1516,7 +1516,7 @@ static void mock_companion(struct acpi_device *adev, = struct device *dev) device_initialize(&adev->dev); fwnode_init(&adev->fwnode, NULL); device_set_node(dev, &adev->fwnode); - adev->fwnode.dev =3D dev; + fw_devlink_set_device(&adev->fwnode, dev); } =20 #ifndef SZ_64G --=20 2.54.0 From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.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 068F542983E for ; Mon, 11 May 2026 16:00:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515232; cv=none; b=Js//1PlnpBbfK+y8wFY4EOAJbowxPNQpGUwjDFUTBeJImdGOW/i75syfPnUf4anAm8oeNAWli3PZrL2It58FkRoXmt6hgpPS0vyqbp72ux9dIoSusXwiBs8sLfCGjzIG4O30dXURZxYyYtxT2MwKDvIv+D9WYE/by0bo1IGUxh0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515232; c=relaxed/simple; bh=ubsI6X5Xu5zb+cBRsMnTdIoklKgyAfSEzw9xNmay2xE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kQjOdRfPhJ6T38H65D6F83P9sb8jdd02g1Gwfi79asFI2M8ixeQqQj8ljCCytiK98Liy1Y608N2KdszDqUP/56IxV8EWQJtjME7Mn1UfCm976jj60gX+a6uW8f/o3Md1pZ6BLMmvh/mZxffv5hjwhmMTaJaXT5heundehqDieYQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=M/MhDJtL; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="M/MhDJtL" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id BDA501A1DD5; Mon, 11 May 2026 16:00:29 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 90CC960646; Mon, 11 May 2026 16:00:29 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E54A111AF9F27; Mon, 11 May 2026 18:00:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515227; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=RFIwM+0jxhTQUJ8FbS/J5053mSqeDF5M67BDJ58yDsE=; b=M/MhDJtLuQST7HtIDAokg/7RtpHFizDOCetRs3b23ehankGCXw2c18cS8YcTmBdyKmuw45 b5WNgeP6IgD46I4MRpLudNjHhEKhVpGIvM0NgzxhwNiLCoSr3GeY7K3pIGjufWdX8TdWJA spdvoGVR/jJJkA83srZNY8hw6gqFE6XScDImM9wePNpHNYpknsuqpjqCg/mnHb8mrZo903 K65/Ui8C3w3xjonFbUdhZJa+B35GOps7l1Qbfkcv/B9BAEOwXMrtfC8zJ3zIO55XgNIFJd TA8h8OaIE9Te+VAPwq75ZS8wNFucjwU11Jge0KtPiqCc00nFPaj/lYIqZD6xiw== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , stable@vger.kernel.org Subject: [PATCH v7 6/8] PCI: of: Use fw_devlink_set_device() Date: Mon, 11 May 2026 17:59:26 +0200 Message-ID: <20260511155930.34604-7-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The code set directly fwnode.dev field. Use the dedicated fw_devlink_set_device() helper to perform this operation. Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Reviewed-by: Andy Shevchenko Acked-by: Bjorn Helgaas --- Cc stable because used by other patches with Fixes + Cc stable --- drivers/pci/of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 6da569fd3b8f..7506208815a4 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -803,7 +803,7 @@ void of_pci_make_host_bridge_node(struct pci_host_bridg= e *bridge) * bus. Avoid any new device creation. */ of_node_set_flag(np, OF_POPULATED); - np->fwnode.dev =3D &bridge->dev; + fw_devlink_set_device(&np->fwnode, &bridge->dev); fwnode_dev_initialized(&np->fwnode, true); =20 ret =3D of_changeset_apply(cset); --=20 2.54.0 From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 64575426D17; Mon, 11 May 2026 16:00:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515237; cv=none; b=BcqB5RypazR02+IcDlNUXHdxVcLgw3qnmDr6UH+o0puD95rvo4PUxc84+d8RBLcmS6UHuc1+MNMb5BuBYoNRSeX+3MP0H8zGtXW0UKXsR7w534jicCUwqDI227MK9O8tkGmBg5GFdV98+WrDbHwWlUu0VC6OT97D+t+NcNvqonE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515237; c=relaxed/simple; bh=F4pEZ1/XVHnWejS6Od1WQ2h5iEBbHLjyrGkDVyYvduc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ug0HBsIiCmSYJ4LE0zJBX31v/Q/VI+fe1NqJ4jdABZxmZ+oJtH76Xq+QX112or7zrQItZAkT/m3Tj0qHHE3WNHY+mkfXhCQcNEG76um+Gvk40j5U1LFRXRzA/xZUPlqfTOtAnv+HGQFlNpNt6IemYRaqhx5qRfRh5CR2ZaLi5p4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=CGUm/7BD; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="CGUm/7BD" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id EBC53C5E14B; Mon, 11 May 2026 16:01:24 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 5D19560646; Mon, 11 May 2026 16:00:35 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 79DA011AF9F2C; Mon, 11 May 2026 18:00:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515233; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=0p0X12GPV0QC8874WBu62G78WkRnfPHdgW0KNFhpaek=; b=CGUm/7BDfZqSunm9R7f1+qtveI0WGsgYVxcuPjxJaTkxv6oeGUO5zPYR46HDyNrPQ+frU4 ZG6T/wwveqaqLEAEGJJDLtK6OtJOKFeWTgPZiDq905Hzz5hsnI7PeZGxGkPWvHZzUBCyAA qGPbTOOIk0cAQ3bwsTEBiMYDikYAVnEmFFFhmSFJ8axoi26GZ05yI52Qn3BQbrCjCOcBOL 2oH5AKvmx6oIKtZlfR1Q2c6GaSQ18s5DjhDCL0zx9GO8FSeVVSO61E1Udb2760inugmGru PkFTkRai10UlwwP6ebtJy5ahqQ4Gr2mach+P+gdU2iKiBMZ+M/yZjtxBTbXkTQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , stable@vger.kernel.org Subject: [PATCH v7 7/8] PCI: of: Set fwnode device of newly created PCI device nodes Date: Mon, 11 May 2026 17:59:27 +0200 Message-ID: <20260511155930.34604-8-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Device-tree node can be created when CONFIG_PCI_DYNAMIC_OF_NODES. Those nodes are created and filled based on PCI core information but the fwnode device field is not set. When later an overlay is applied, this confuses fw_devlink. Indeed, without any device attached to the node, fw_devlink considers that this node will never become a device. When this node is pointed as a supplier, devlink looks at its ancestors in order to find a node with a device that could be used as the supplier. In the PCI use case, this leads to links that wrongly use the PCI root bridge device as the supplier instead of the expected PCI device. Setting the fwnode device to the device of the PCI device allows devlink to use this device as a supplier and so, correct links are created. Fixes: 407d1a51921e ("PCI: Create device tree node for bridge") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Acked-by: Bjorn Helgaas --- drivers/pci/of.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 7506208815a4..25fb02c3dc72 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -709,6 +709,13 @@ void of_pci_make_dev_node(struct pci_dev *pdev) if (ret) goto out_free_node; =20 + /* + * Set the fwnode device in order to have fw_devlink creating links + * pointing to this PCI device instead of walking up to the PCI host + * bridge. + */ + fw_devlink_set_device(&np->fwnode, &pdev->dev); + ret =3D of_changeset_apply(cset); if (ret) goto out_free_node; --=20 2.54.0 From nobody Sat Jun 13 01:43:37 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.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 D4792423152; Mon, 11 May 2026 16:00:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515244; cv=none; b=l04RkVhyZIAIoPi0gvk2w7DpPpEBAcua7A1L6p9/of9yGM1DXcqF1oqYcfZeHqvn5PL4nSxoilElStJ7SW+Z5SsjmIK/gfs172IN+yr0cu705W2DFCqv85b4AzmIWq7p1gLlBf0vz4E5z7cHXLyog+t2WAed43uOdecm6n0r020= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515244; c=relaxed/simple; bh=4TP647h6bUcWpLakNWuVEPNBqVaigqPU6a5rJXnvNrM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jRxpf8LkFOTdDQGWpNG0kj0bK+JFac03/gjfQ4cBAwuAcOMMJnzIzRkf3HJS2G4HZmL8+pjtNcTI/BZlZdeCWzZGE63++XlfSXt+jUXdWKFxMO1zbAIdHOgLSv9W2W0rjEaClz2uLx/pKqGCMmNgN29iGVzUhsWlHg37t39XtVc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Vj95Q6ZP; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Vj95Q6ZP" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id AAC621A1DD5; Mon, 11 May 2026 16:00:41 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7D27B60646; Mon, 11 May 2026 16:00:41 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C4D7E11AF9F2D; Mon, 11 May 2026 18:00:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1778515239; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=bKqIe7WRSBpcbkduycfdUius+fdoa8lS+ROf87HCzsw=; b=Vj95Q6ZPshNanZOcR9ZKav90YIJrBT58CHMzeCV960whdbMmwRonhTR4DxYcbPkZDcIsUt 8Lo8LoH8LmUo6wLiqD2rMkT00ApFiamXjMMaoEmK5xSr7jHfeZwSws2M9Iutz9nHB8ev6U K8zBaH+9GrYqtaXUqkjWsB3gz6gH79p+3FnbQIXgs9oEOEEVP2jv7BXCsPzy8CbNmyjbVy tLbE2ssOjgosNUQC+Vzy69fiOvMOE42T1gnbo+/p9Lj4tr76+BB6/qijyXvrvZfzKPlPBg 3juJBPm6aCd8ozPqyt9ssknX7Xv8QcOjm6Ec5+EsvnwJW2BQ9jWrcB7bgHgQrQ== From: Herve Codina To: Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Lizhi Hou , Herve Codina Cc: driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Daniel Machon , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni , stable@vger.kernel.org Subject: [PATCH v7 8/8] PCI: of: Remove fwnode_dev_initialized() call for a PCI root bridge node Date: Mon, 11 May 2026 17:59:28 +0200 Message-ID: <20260511155930.34604-9-herve.codina@bootlin.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260511155930.34604-1-herve.codina@bootlin.com> References: <20260511155930.34604-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" During the instantiation of devices described by a device-tree overlay applied on a PCI device, devlink displays the following kind of debug messages instead of creating the expected links: 'Not linking xxxx - might never become dev' Without those expected links, the device removal order cannot be correct. Those debug traces are printed by fw_devlink_create_devlink(). In our use case, they are all printed because the supplier of the link has at least one of its ancestor with its fwnode flag FWNODE_FLAG_INITIALIZED set. The culprit ancestor is the PCI root bridge. The fwnode related to the PCI root bridge is created dynamically by the of_pci_make_host_bridge_node() function. During this creation fwnode_dev_initialized() is called which set the FWNODE_FLAG_INITIALIZED flag. Calling fwnode_dev_initialized() tells devlink that the device related to this node is handled out of the driver core. This is not correct in our case. Indeed the device related to this firmware node is handled using driver core mechanisms and is fully compliant devlink expectations. Simply remove the fwnode_dev_initialized() call. With that done, the devlink debug messages are no more displayed and links that were missing are correctly created. Fixes: 1f340724419e ("PCI: of: Create device tree PCI host bridge node") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Acked-by: Bjorn Helgaas --- drivers/pci/of.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 25fb02c3dc72..53a8a4f30eb6 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -811,7 +811,6 @@ void of_pci_make_host_bridge_node(struct pci_host_bridg= e *bridge) */ of_node_set_flag(np, OF_POPULATED); fw_devlink_set_device(&np->fwnode, &bridge->dev); - fwnode_dev_initialized(&np->fwnode, true); =20 ret =3D of_changeset_apply(cset); if (ret) --=20 2.54.0