]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: ehci: replace scnprintf() with sysfs_emit()
authorHendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
Mon, 23 Jun 2025 14:09:50 +0000 (16:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jun 2025 14:40:19 +0000 (15:40 +0100)
commit4f4b2f13044d55190ac7963dc8ef563a39844548
tree3fd7c70918580a543b55c8a56ec54011316c200f
parent711d41ab4a0e4230e394fd5da5b85604ddb9fc51
usb: ehci: replace scnprintf() with sysfs_emit()

Per Documentation/filesystems/sysfs.rst, show() methods should only
use sysfs_emit() or sysfs_emit_at() when formatting values to be
returned to userspace.

Convert the uses of scnprintf() in sysfs show() methods to
sysfs_emit() and sysfs_emit_at() for better safety and consistency.

Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
Link: https://lore.kernel.org/r/20250623140950.61568-1-hendrik.hamerlinck@hammernet.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-sysfs.c