Re: [PATCH net-next 1/1] net: mdio: eliminate kdoc warnings in mdio_device.c and mdio_bus.c

From: Andrew Lunn

Date: Fri Nov 21 2025 - 08:49:52 EST


On Fri, Nov 21, 2025 at 08:45:42AM +0100, Buday Csaba wrote:
> Fix all warnings reported by scripts/kernel-doc in
> mdio_device.c and mdio_bus.c
>
> Signed-off-by: Buday Csaba <buday.csaba@xxxxxxxxx>
> ---
> drivers/net/phy/mdio_bus.c | 56 ++++++++++++++++++++++++++++++-----
> drivers/net/phy/mdio_device.c | 6 ++++
> 2 files changed, 55 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index ef041ad66..a00dc7451 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -339,7 +339,7 @@ EXPORT_SYMBOL_GPL(mdio_bus_class);
> * mdio_find_bus - Given the name of a mdiobus, find the mii_bus.
> * @mdio_name: The name of a mdiobus.
> *
> - * Returns a reference to the mii_bus, or NULL if none found. The
> + * Returns: a reference to the mii_bus, or NULL if none found. The
> * embedded struct device will have its reference count incremented,
> * and this must be put_deviced'ed once the bus is finished with.
> */
> @@ -357,7 +357,7 @@ EXPORT_SYMBOL(mdio_find_bus);
> * of_mdio_find_bus - Given an mii_bus node, find the mii_bus.
> * @mdio_bus_np: Pointer to the mii_bus.
> *
> - * Returns a reference to the mii_bus, or NULL if none found. The
> + * Returns: a reference to the mii_bus, or NULL if none found. The

In these two cases you use "Returns:"

> * embedded struct device will have its reference count incremented,
> * and this must be put once the bus is finished with.
> *
> @@ -405,6 +405,8 @@ static void mdiobus_stats_acct(struct mdio_bus_stats *stats, bool op, int ret)
> * @addr: the phy address
> * @regnum: register number to read
> *
> + * Return: The register value if successful, negative error code on failure


And everywhere else "Return:".

It would be nice if it was consistent.

Andrew