Re: [patch net-next 3/3] net: devlink: fix unlocked vs locked functions descriptions

Jakub Kicinski
2022-07-01T16:30:45Z

On Fri, 1 Jul 2022 11:59:26 +0200 Jiri Pirko wrote:

> + * Register devlink port with provided port index. User can use
> + * any indexing, even hw-related one. devlink_port structure
> + * is convenient to be embedded inside user driver private structure.
> + * Note that the caller should take care of zeroing the devlink_port
> + * structure.

Should we also mention that the port type has to be set later?
I guess that may be beyond the scope.

> + */

> +/**
> + * devlink_port_unregister - Unregister devlink port

devl_

> + *
> + * @devlink_port: devlink port
> + */

I wonder if we should use this as an opportunity to start following
the more modern kdoc format:

No tab indentation, and () after the function's name.

At least for the new kdoc we add.

> void devl_port_unregister(struct devlink_port *devlink_port)
> {
> lockdep_assert_held(&devlink_port->devlink->lock);