From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DBC7F226CFE; Tue, 24 Feb 2026 00:33:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771893203; cv=none; b=Z4UmsNDBhjpXKDGNUVo+OIEqnZNpaNo2qoyUM57a7fErrdh2S0Q5ltiXBSPfd1vbNu9XGxNWO0kEzfuF9qTwLj4277y6dSY+hlcuHO0QiQL0PrDjuIW2cuQTz6CldhnqevsDZ24UpV5ka2+SpNbIa7aXAuZ47pywZ5sVagTQLUM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771893203; c=relaxed/simple; bh=8LAjFwluR8WNxqcDxtrU9nLb7Eues+PFs2wZ0u6676Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D8X0FAg+JRGnCPTOO4NF4xa5lHnvUdWT2V0Aaw8kFDt3Nk7Xbr80+9aqgTplS7X0q9JwP0sHGegyvZGqaVOygURDz7BOtZm1uyLMLx5nTTtG1mNh1nbC9sxzPk/q3hpQ+U2fgPLc5/213O8fxfT8i1/0PmOog0R21kgJjopEvsM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MG/SzwAd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="MG/SzwAd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88DA1C116C6; Tue, 24 Feb 2026 00:33:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1771893203; bh=8LAjFwluR8WNxqcDxtrU9nLb7Eues+PFs2wZ0u6676Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MG/SzwAdbZSDWUv8ZQC51UudK2nUmf0Rvps6WS3HkG7vdqvzKDQxaFm/cayjdkI5f /hkEcnJ4kXiFGuAjaGIyhIKtXA+26p8Fl3EKv3Uvmbp3T4MLEkQnC+1WzPw39lBZLw HilsnqSag86Yrt5oT17A+I1OpOLP4rJbNf84iV3E= Date: Tue, 24 Feb 2026 01:33:21 +0100 From: Greg Kroah-Hartman To: Andy Shevchenko Cc: Zijun Hu , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, linux-acpi@vger.kernel.org, "Rafael J. Wysocki" , Danilo Krummrich , Len Brown , Daniel Scally , Heikki Krogerus , Sakari Ailus Subject: Re: [PATCH v1 3/3] driver core: Split device related fwnode API to device/fwnode.h Message-ID: <2026022443-cornmeal-overstock-cd70@gregkh> References: <20260223204412.3298508-1-andriy.shevchenko@linux.intel.com> <20260223204412.3298508-4-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: driver-core@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260223204412.3298508-4-andriy.shevchenko@linux.intel.com> On Mon, Feb 23, 2026 at 09:30:32PM +0100, Andy Shevchenko wrote: > device.h is a huge header which is hard to follow and easy to miss > something. Improve that by splitting device related fwnode API > to device/fwnode.h. > > In particular this helps to speedup the build of the code that includes > device.h solely for a device related fwnode API. > > Signed-off-by: Andy Shevchenko > --- > include/linux/device.h | 17 +---------------- > include/linux/device/fwnode.h | 28 ++++++++++++++++++++++++++++ > 2 files changed, 29 insertions(+), 16 deletions(-) > create mode 100644 include/linux/device/fwnode.h > > diff --git a/include/linux/device.h b/include/linux/device.h > index 4ba6ae72ddf6..d2e2745243ea 100644 > --- a/include/linux/device.h > +++ b/include/linux/device.h > @@ -31,6 +31,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -38,8 +39,6 @@ struct device_driver; > struct module; > struct class; > struct subsys_private; > -struct device_node; > -struct fwnode_handle; > > /** > * struct subsys_interface - interfaces to device functions > @@ -603,20 +602,6 @@ int lock_device_hotplug_sysfs(void); > int device_offline(struct device *dev); > int device_online(struct device *dev); > > -void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode); > -void set_secondary_fwnode(struct device *dev, struct fwnode_handle *fwnode); > -void device_set_node(struct device *dev, struct fwnode_handle *fwnode); > -int device_add_of_node(struct device *dev, struct device_node *of_node); > -void device_remove_of_node(struct device *dev); > -void device_set_of_node_from_dev(struct device *dev, const struct device *dev2); > - > -static inline struct device_node *dev_of_node(struct device *dev) > -{ > - if (!IS_ENABLED(CONFIG_OF) || !dev) > - return NULL; > - return dev->of_node; > -} > - > static inline int dev_num_vf(struct device *dev) > { > if (dev->bus && dev->bus->num_vf) > diff --git a/include/linux/device/fwnode.h b/include/linux/device/fwnode.h > new file mode 100644 > index 000000000000..4fe6107191a6 > --- /dev/null > +++ b/include/linux/device/fwnode.h > @@ -0,0 +1,28 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _DEVICE_FWNODE_H_ > +#define _DEVICE_FWNODE_H_ You lost the copyright notice. While not really needed from a legal point of view, it's not all that nice from a developer point of view :(