Thread (7 messages) 7 messages, 4 authors, 2023-11-02

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

flat view

From: Russell King (Oracle) <linux@armlinux.org.uk>
Date: 2023-11-02 19:23:50
Also in: bpf, intel-wired-lan, linux-hyperv, linux-mediatek, lkml

On Thu, Nov 02, 2023 at 06:55:42PM +0000, Justin Stitt wrote:
quoted hunk ↗ jump to hunk
+/**
+ * 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!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help