]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
thermal: Replace sprintf() with sysfs_emit() for sysfs show functions
authorSumeet Pawnikar <sumeet4linux@gmail.com>
Sat, 10 Jan 2026 09:28:51 +0000 (14:58 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 15 Jan 2026 20:03:19 +0000 (21:03 +0100)
commit7cb776b74c666c04c9fa10482b0e4d9f049d4fc2
tree5021dedbdd2a65cf9b2b4fc0e75b8beed21336b7
parent1d97b8e3bfbb4fec99054cb5c413652a0ccfdeec
thermal: Replace sprintf() with sysfs_emit() for sysfs show functions

Replace all sprintf() calls with sysfs_emit() and sysfs_emit_at() in
sysfs show functions.

sysfs_emit() and sysfs_emit_at() are preferred over sprintf() for
formatting sysfs output as they provide better bounds checking and
prevent potential buffer overflows.

Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com>
Link: https://patch.msgid.link/20260110092851.9078-1-sumeet4linux@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_hwmon.c
drivers/thermal/thermal_sysfs.c