Hi Dan,

I went through the archives. I should have done that before sending v2. The earlier threads make your point clear: out-of-tree code reads these attributes, so adding a newline changes the bytes that code sees, and checkpatch is not a reason to take that risk.

I checked what changes for a reader. Scripts reading a line get the result they expect, while anything comparing the raw value would now see an extra byte. I can't find those consumers from inside the tree, and I have no way to test the ones I can't see. That leaves me unable to give the guarantee you asked for.
Please drop v2. Thanks for taking the time to explain it.

regards,
Chhabilal Dangal

On Mon, Nov 23, 2026 at 9:13 PM Dan Carpenter <error27@gmail.com> wrote:
On Mon, Nov 23, 2026 at 08:25:42PM +0545, Chhabilal Dangal wrote:
> The sysfs show callbacks for name, vid, pid, intf_id, ip_devices and
> op_devices print their value without a trailing newline, so a read
> from userspace runs into the next line.  Other sysfs attributes end
> with a newline.
>
> Line-oriented readers treat an unterminated final line as incomplete:
> read(1) returns failure while still filling the variable, and wc -l
> reports zero lines for the file.
>
> These attributes have no Documentation/ABI entry and no in-tree
> readers.  Adding the newline does change the user-visible output, so
> it is an ABI change for any out-of-tree consumer that reads the raw
> value.  Please drop the patch if that is not acceptable.

Yeah, sorry I was unclear.  All the users are out-of-tree.  It's
user space after all.  So we can't merge this unless you can
ensure that the out of tree users don't break.

regards,
dan carpenter