From mboxrd@z Thu Jan 1 00:00:00 1970 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 702AE52ED3C for ; Tue, 13 Oct 2026 17:49:43 +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=1791913786; cv=none; b=SmwJ9cRA8HUx36WjYRozSPYAHsTDI2jlHI3/Hs8Mw7dHXemuwdQ/fRtgE0iZ6V/d6wW+p1bRcqwms2W1+4PrBvOC2OQbPkkteE46wuppBkKVy81774S+G2X9a5HcWYngMrSgPahHkwmx3pMuUmiitL1Q8zCgGXKg3lGk58VIR88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791913786; c=relaxed/simple; bh=LeDPnBgrM7pNQ8OlNZHsJRQR3r2PXLGLegBZ2Qsqzf8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VcFOGAiR9J/zLlAS1CEkZZt07RZ3F+8itUJecJfJ20Qr1ZtXZJ8vaJIydrVI26XhFFD9zps1TZtmSV7QJKruaNdp+uShiyG3o2C3lzZ8kdl7u+LOcA6GOyd8ALFraHWboYxcVMJeWoVQ+ssyZU7J0TA0tVihMnrpuzSnrK+thIo= 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=IMLRJ+wE; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=FjGgQOgH; 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="IMLRJ+wE"; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="FjGgQOgH" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 6DDC8C653FD for ; Tue, 13 Oct 2026 17:50:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CE5EA60362 for ; Tue, 13 Oct 2026 17:49:41 +0000 (UTC) Received: by mail.galae.net (Postcow, from userid 0) id 6D27211D717E5; Tue, 13 Oct 2026 19:48:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1791913781; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=kAb7NHjVc8QoTRTxUb1OG7thf2F5YhXlem84GhsJqnE=; b=IMLRJ+wEUlw2ELAuUZe0I6LBlGHU17M49MgfUJZgE6NDd3paPaXqfJ1D51bfKcZlAnkLJl NpbCUPInkj79QnsQGjk0/sP9R1zPcGlfNfODuCSJHoYwJgBOPSCZnr84y2CRmEuSWyEtWV +5gMK2xxXCpqt1mAbfuke84djeoC1UXl25dgT17niiVXjcTorBJQJ3Mws0mcTGud1GL8hN wW8Nd3Z14pM1IbCaqc0rNHjJetIDk3TN02ODgEncLmj02zID2k3HyhYYx06R6yWqmVIAop fA8BB4I8ZRt0NyV7FqZFbN7gokFtkrCk6c7A9ZHuTnqHGWTDPG3jxBUtRvho+Q== Authentication-Results: mail.galae.net; none Received: from mail.galae.net ([172.22.1.253]) by 9e7fea892943 with LMTP id SKPIALTuzGoYHxEAtaWaaQ (envelope-from ) for ; Mon, 12 Oct 2026 16:29:08 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id F37FF11D708B4; Mon, 12 Oct 2026 16:28:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1791815339; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=kAb7NHjVc8QoTRTxUb1OG7thf2F5YhXlem84GhsJqnE=; b=FjGgQOgHcTUDDGnIbSuozwmNqeMTRdBQVZaPNnUfhfNiHolctNHx1hOE21Ll6aYc6zsp1v tYfEnkKxdGOOtY680hMNAcNEJaM9GkRVagicVm8ou5DFrd5VuLmwgGbbtWaPBFa0nRcAW7 iuGKxtDnIWPKwfwaYZObdeJ9zckNqniI+KLN1vyuvrXhXy0sCRuVe0N2R2v06p+hCVJxzJ Oxu6iH3orqfi6ElTPOegR+Wj2TpZlYb7tN7T2IqKprgAnyueowX5lDSHa/Zsq+QxXiQiAc GNRjXOfG2P+7tWArtGJk8xGwxsp+opS6e8tVRR7Xqp4HXMpqP3lAkPgm74kLIg== From: Herve Codina To: Richard Cheng , Andrew Lunn , Rob Herring , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Bartosz Golaszewski , Len Brown , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Dan Williams , Ira Weiny , Li Ming , Herve Codina , Lizhi Hou 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 , Bartosz Golaszewski Subject: [PATCH v13 01/10] driver core: fw_devlink: Introduce fw_devlink_set_device() Date: Mon, 12 Oct 2026 16:28:15 +0200 Message-ID: <20261012142826.159178-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261012142826.159178-1-herve.codina@bootlin.com> References: <20261012142826.159178-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: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-Last-TLS-Session-Version: None X-Rspamd-Queue-Id: 6D27211D717E5 X-Spamd-Result: default: False [1.77 / 30.00]; DATE_IN_PAST(1.00)[27]; MID_CONTAINS_FROM(1.00)[]; BAYES_HAM(-0.73)[77.64%]; R_MISSING_CHARSET(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; URIBL_BLOCKED(0.00)[localhost:rdns,localhost:helo,cirrus.com:email,qualcomm.com:email,bootlin.com:mid,bootlin.com:email,nvidia.com:email,linaro.org:email,intel.com:email]; RCVD_VIA_SMTP_AUTH(0.00)[]; BCC(0.00)[]; NEURAL_HAM(-0.00)[-1.000]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FORWARDED(0.00)[herve.codina@bootlin.com]; RCPT_COUNT_TWELVE(0.00)[45]; PREVIOUSLY_DELIVERED(0.00)[herve.codina@bootlin.com]; DKIM_SIGNED(0.00)[bootlin.com:s=dkim]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEMAIL_TO(0.00)[nvidia.com,lunn.ch,kernel.org,linuxfoundation.org,google.com,opensource.cirrus.com,cirrus.com,linux.intel.com,gmail.com,stgolabs.net,intel.com,zohomail.com,bootlin.com,amd.com]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RECEIVED_HELO_LOCALHOST(0.00)[]; MAILCOW_DOMAIN_HEADER_FROM(0.00)[bootlin.com] Setting fwnode->dev is specific to fw_devlink. In order to avoid having a direct 'fwnode->dev = 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 Reviewed-by: Richard Cheng Reviewed-by: Bartosz Golaszewski --- 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 a9dcaf7e7076..3ce49575cf82 100644 --- a/include/linux/fwnode.h +++ b/include/linux/fwnode.h @@ -260,4 +260,10 @@ void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode); void fw_devlink_refresh_fwnode(struct fwnode_handle *fwnode); bool fw_devlink_is_strict(void); +static inline void fw_devlink_set_device(struct fwnode_handle *fwnode, + struct device *dev) +{ + fwnode->dev = dev; +} + #endif -- 2.55.0