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:
Zhongqiu Han
2026-07-16 21:15:46 +08:00
committed by Rafael J. Wysocki
parent f08b21ef54
commit a343c6f15c

View File

@@ -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