Skip to content
Commit 5a242d85 authored by Nguyen Dinh Phi's avatar Nguyen Dinh Phi Committed by Greg Kroah-Hartman
Browse files

samples/kobject: Use sysfs_emit instead of sprintf



sysfs_emit() is preferred over sprintf() when formatting the value to be
returned to user space in show() functions, because it knows about sysfs
buffer specifics and has sanity checks.

Signed-off-by: default avatarNguyen Dinh Phi <phind.uet@gmail.com>
Link: https://lore.kernel.org/r/20220303183618.1342358-1-phind.uet@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b0f6807d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment