On Sat, Mar 28, 2026 at 10:15:27AM +0530, Shivam Gupta wrote:
sysfs_emit outputs in audio_manager_module.c do not include a terminating newline, which is required for proper sysfs formatting.
Add newline characters to all sysfs_emit format strings.
Signed-off-by: Shivam Gupta shivgupta751157@gmail.com
You just changed the user/kernel api here, are you _sure_ it is ok to do so? What tools just broke or were used to test this? What tool asked you to make this change?
thanks,
greg k-h
I'm not the author, but I've been going through the staging tree, running checkpatch on various files, and reading documentation to get started with kernel development. This particular file (`drivers/staging/greybus/audio_manager_module.c`) triggers checkpatch warnings about missing newlines in `sysfs_emit` calls.
It seems fine to make this change tho, as it reflects the proper kernel API documented in `Documentation/filesystems/sysfs.rst`. One of the examples at line 266 shows the intended behaviour as:
static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) { return sysfs_emit(buf, "%s\n", dev->name); }
So to answer the question: checkpatch flagged it, and the kernel documentation confirms this is the correct usage of the function.
Happy to help.
Hadi Chokr