Re: [PATCH v2 3/8] swnode: fix device_add_of_node() kernel doc

From: Andy Shevchenko

Date: Tue Nov 10 2026 - 06:20:19 EST


On Tue, Nov 10, 2026 at 09:51:19AM +0100, Johan Hovold wrote:
> Software nodes added to a device by device_add_software_node() are
> always secondary firmware nodes even if they may be stored in the
> dev->fwnode pointer.
>
> Fix the kernel doc which incorrectly claims that a software node added
> using this interface "could become the primary node".
>
> Also clarify that device_remove_software_node() should only be used to
> remove software nodes added by device_add_software_node().

...

> * @dev: The device the software node is meant for.
> * @node: The software node.
> *
> - * This function will make @node the secondary firmware node pointer of @dev. If
> - * @dev has no primary node, then @node will become the primary node. The
> - * function will register @node automatically if it wasn't already registered.
> + * Register @node if it was not already registered and make it the secondary
> + * firmware node of @dev.

While at it, please add a missing Return section (as kernel-doc complains about).

> */
> int device_add_software_node(struct device *dev, const struct software_node *node)
> {

--
With Best Regards,
Andy Shevchenko