Loading
powercap: Replace sprintf() with sysfs_emit() in sysfs show functions
Replace all sprintf() calls with sysfs_emit() in sysfs show functions. sysfs_emit() is preferred over sprintf() for formatting sysfs output as it provides better bounds checking and prevents potential buffer overflows. Also, replace sprintf() with sysfs_emit() in show_constraint_name() and simplify the code by removing the redundant strlen() call since sysfs_emit() returns the length. Signed-off-by:Sumeet Pawnikar <sumeet4linux@gmail.com> Link: https://patch.msgid.link/20260111141237.12340-1-sumeet4linux@gmail.com Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>