]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: core: use sysfs_emit() instead of sprintf()
authorJiayi Li <lijiayi@kylinos.cn>
Wed, 23 Oct 2024 08:54:29 +0000 (16:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2024 03:33:49 +0000 (04:33 +0100)
commitc67e9601e29a636a14626707a7b2e5832ba71a75
tree3acd54834fc87cc2dcadf5c842e89b233e275a33
parent33a0302455d664f18a4a65fd5a9997c0cef6bd39
usb: core: use sysfs_emit() instead of sprintf()

Follow the advice in Documentation/filesystems/sysfs.rst:
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.

Signed-off-by: Jiayi Li <lijiayi@kylinos.cn>
Link: https://lore.kernel.org/r/20241023085429.2865488-1-lijiayi@kylinos.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/endpoint.c
drivers/usb/core/ledtrig-usbport.c
drivers/usb/core/port.c