Home
last modified time | relevance | path

Searched hist:"5 a242d8547bdc5802d1e1200a85e69afc3c2d74e" (Results 1 – 2 of 2) sorted by relevance

/linux/samples/kobject/
H A Dkobject-example.cdiff 5a242d8547bdc5802d1e1200a85e69afc3c2d74e Thu Mar 03 19:36:18 CET 2022 Nguyen Dinh Phi <phind.uet@gmail.com> 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: Nguyen Dinh Phi <phind.uet@gmail.com>
Link: https://lore.kernel.org/r/20220303183618.1342358-1-phind.uet@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H A Dkset-example.cdiff 5a242d8547bdc5802d1e1200a85e69afc3c2d74e Thu Mar 03 19:36:18 CET 2022 Nguyen Dinh Phi <phind.uet@gmail.com> 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: Nguyen Dinh Phi <phind.uet@gmail.com>
Link: https://lore.kernel.org/r/20220303183618.1342358-1-phind.uet@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>