summaryrefslogtreecommitdiff
path: root/init/main.c
diff options
context:
space:
mode:
authorKaushlendra Kumar <kaushlendra.kumar@intel.com>2025-09-17 10:38:20 +0530
committerShuah Khan <skhan@linuxfoundation.org>2025-09-24 17:15:35 -0600
commit23199d2aa6dcaf6dd2da772f93d2c94317d71459 (patch)
tree463287322912c4aad4e03ad419f1ed42523499c0 /init/main.c
parent57b100d4cf14276e0340eecb561005c07c129eb8 (diff)
tools/cpupower: Fix incorrect size in cpuidle_state_disable()
Fix incorrect size parameter passed to cpuidle_state_write_file() in cpuidle_state_disable(). The function was incorrectly using sizeof(disable) which returns the size of the unsigned int variable (4 bytes) instead of the actual length of the string stored in the 'value' buffer. Since 'value' is populated with snprintf() to contain the string representation of the disable value, we should use the length returned by snprintf() to get the correct string length for writing to the sysfs file. This ensures the correct number of bytes is written to the cpuidle state disable file in sysfs. Link: https://lore.kernel.org/r/20250917050820.1785377-1-kaushlendra.kumar@intel.com Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions