diff options
| author | Sumeet Pawnikar <sumeet4linux@gmail.com> | 2026-01-11 19:42:36 +0530 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-01-15 21:12:04 +0100 |
| commit | 07e5e811f86dcd6f595c3bbd71cde294e8545889 (patch) | |
| tree | 92a48f4e3f65e511c49a6a74f5fba097d498a88c /rust/alloc/collections/git@git.tavy.me:linux.git | |
| parent | 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb (diff) | |
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>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
