[PATCH net-next v4 1/3] ethtool: Implement ethtool_puts()

Russell King (Oracle) linux at armlinux.org.uk
Thu Nov 2 12:22:06 PDT 2023


On Thu, Nov 02, 2023 at 06:55:42PM +0000, Justin Stitt wrote:
> +/**
> + * ethtool_puts - Write string to ethtool string data
> + * @data: Pointer to a pointer to the start of string to update
> + * @str: String to write
> + *
> + * Write string to *data. Update *data to point at start of
> + * next string.

A minor nit...

Sorry to jump in a bit late in this, but... concerning the use of "puts"
the userspace stdio version adds a trailing newline. Thus, to avoid any
confusion, I think the kerneldoc for this should explicitly state that
this does not add a newline.

 * Write string to *data without a trailing newline. Update *data to
 * point at the start of the next string.

This shouldn't be an issue, but it makes the behaviour of it plainly
obvious to the reader.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the Linux-mediatek mailing list