clockevents: Convert s[n]printf() to sysfs_emit()
authorLi Zhijian <lizhijian@fujitsu.com>
Thu, 14 Mar 2024 10:04:02 +0000 (18:04 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 9 Apr 2024 10:32:37 +0000 (12:32 +0200)
commit98fe0fcb326a923740cb8900aa7ed7fe538c984a
tree1a324e4308dd88f7a13d0b5edb228d109060a3c3
parent8f0acb7f3a1331559e325566c00c26d1523dfe06
clockevents: Convert s[n]printf() to sysfs_emit()

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

coccinelle complains that there are still a couple of functions that use
snprintf(). Convert them to sysfs_emit().

Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240314100402.1326582-2-lizhijian@fujitsu.com
kernel/time/clockevents.c