mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 10:31:33 -04:00
cpufreq: schedutil: Replace sprintf() with sysfs_emit() in sysfs show
Use sysfs_emit() instead of sprintf() in rate_limit_us_show(). sysfs_emit() is the preferred API for sysfs output as it provides PAGE_SIZE bounds checking and ensures proper sysfs formatting. No functional change intended. Signed-off-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com> Link: https://patch.msgid.link/20260716131546.1159644-1-zhongqiu.han@oss.qualcomm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
f08b21ef54
commit
a343c6f15c
@@ -592,7 +592,7 @@ static ssize_t rate_limit_us_show(struct gov_attr_set *attr_set, char *buf)
|
||||
{
|
||||
struct sugov_tunables *tunables = to_sugov_tunables(attr_set);
|
||||
|
||||
return sprintf(buf, "%u\n", tunables->rate_limit_us);
|
||||
return sysfs_emit(buf, "%u\n", tunables->rate_limit_us);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
||||
Reference in New Issue
Block a user