]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq: update to sysfs_emit() for safer buffer handling
authorPerry Yuan <perry.yuan@amd.com>
Wed, 19 Jun 2024 08:15:20 +0000 (16:15 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 20 Jun 2024 17:47:11 +0000 (19:47 +0200)
commit5e62d53c763aa44be07a7b7ecb5a94a269bb0ed1
treed307cdfbca24a39b6d8467ae21aa2f5288a64767
parentede951c27dbd2d4c91b9d54f0b423508a6b5e191
cpufreq: update to sysfs_emit() for safer buffer handling

Replace sprintf() and scnprintf() with sysfs_emit() and sysfs_emit_at()
in the cpufreq core.

This ensures safer buffer handling and consistency with sysfs interfaces.

Update show_scaling_available_governors() and related functions for
compliance with the new API.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20240619081520.259971-1-perry.yuan@amd.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c