Re: [PATCH] staging: greybus: audio_manager: Add missing newline to sysfs_emit outputs
From: Hadi Chokr
Date: Sat Mar 28 2026 - 10:53:16 EST
On Sat, Mar 28, 2026 at 10:15:27AM +0530, Shivam Gupta wrote: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.
sysfs_emit outputs in audio_manager_module.c do not include a terminatingYou just changed the user/kernel api here, are you _sure_ it is ok to do
newline, which is required for proper sysfs formatting.
Add newline characters to all sysfs_emit format strings.
Signed-off-by: Shivam Gupta <shivgupta751157@xxxxxxxxx>
so? What tools just broke or were used to test this? What tool asked
you to make this change?
thanks,
greg k-h
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