kernel/reboot: replace sprintf() with sysfs_emit()
authorzhangguopeng <zhangguopeng@kylinos.cn>
Tue, 5 Nov 2024 09:49:41 +0000 (17:49 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 12 Nov 2024 01:17:05 +0000 (17:17 -0800)
commit45dac1959bbdc498a2abb89919221455225789dc
tree66345aa96686b11a4ff28af03be15d748908129a
parent111314157f7891da7a51a8f95df42eeb22f4268a
kernel/reboot: replace sprintf() with sysfs_emit()

As Documentation/filesystems/sysfs.rst suggested, show() should only use
sysfs_emit() or sysfs_emit_at() when formatting the value to be returned
to user space.

No functional change intended.

Link: https://lkml.kernel.org/r/20241105094941.33739-1-zhangguopeng@kylinos.cn
Signed-off-by: zhangguopeng <zhangguopeng@kylinos.cn>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Joel Granados <joel.granados@kernel.org>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/reboot.c