Re: [PATCH 1/2] net: usb: cdc_ncm: convert sysfs show() callbacks to sysfs_emit()
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2026-03-18 06:37:04
Also in:
linux-usb
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2026-03-18 06:37:04
Also in:
linux-usb
On Tue, Mar 17, 2026 at 11:06:31PM -0500, Omer Zalman wrote:
sysfs_emit() was introduced in v5.10 as the preferred replacement for sprintf() in sysfs show() handlers. It bounds output to PAGE_SIZE and avoids potential buffer overruns. Convert all show() callbacks and the NCM_PARM_ATTR macro from sprintf() to sysfs_emit().
There is no need to change existing show functions to sysfs_emit(), unless you are doing some other work in the same area. Otherwise it would be a huge churn all across the tree. So no need for this patch, sorry. thanks, greg k-h