]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: greybus: loopback: use sysfs_emit in sysfs show functions
authorLuis Soza Rodriguez <luistermc789@gmail.com>
Mon, 9 Mar 2026 23:05:07 +0000 (17:05 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2026 15:48:48 +0000 (16:48 +0100)
commita11fdb9f58cc4bd7793b259ee73f984799753ba7
tree1f8dc68e31384baefc595a4afb3e03803ce5fd03
parente66cd5a8f2b48eb513867dcf0c3d25d8a405ec57
staging: greybus: loopback: use sysfs_emit in sysfs show functions

As per the kernel's documentation, sysfs_emit() is the preferred way
to format strings for sysfs attributes. It handles buffer overruns
safely. Replace sprintf calls with sysfs_emit across all loopback
sysfs show macros.

Signed-off-by: Luis Soza Rodriguez <contact@sluisr.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20260309230507.4931-1-contact@sluisr.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/loopback.c