cpuidle: sysfs: Use sysfs_emit()/sysfs_emit_at() instead of sprintf()/scnprintf()
authorVivek Yadav <vivekyadav1207731111@gmail.com>
Fri, 19 Sep 2025 16:56:57 +0000 (22:26 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 20 Sep 2025 11:06:37 +0000 (13:06 +0200)
commit8dba0fd9cee34b80d6e26a188115e5427773285a
tree5d105ca5c6283a8ba908ddcf8c01f95b19d2e065
parenta2d100c47f4eccb0cb6c2a6a915f2c9e13b54ae7
cpuidle: sysfs: Use sysfs_emit()/sysfs_emit_at() instead of sprintf()/scnprintf()

The ->show() callbacks in sysfs should use sysfs_emit() or
sysfs_emit_at() when formatting values for user space.

These helpers are the recommended way to ensure correct buffer
handling and consistency across the kernel.

See Documentation/filesystems/sysfs.rst for details.

No functional change intended.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Vivek Yadav <vivekyadav1207731111@gmail.com>
Link: https://patch.msgid.link/20250919165657.233349-1-vivekyadav1207731111@gmail.com
[ rjw: Minor subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/sysfs.c