aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-09-23 06:33:14 +0000
committerHans de Goede <hdegoede@redhat.com>2022-09-27 15:06:32 +0200
commit76a13da75d3ae5acc3cbc02eef558d8faa12e846 (patch)
tree95c4e2bcecc92c8a88cdb4badbcbb64200a44a17 /drivers/platform
parentplatform/x86: dell-smbios-base: Use sysfs_emit() (diff)
downloadlinux-dev-76a13da75d3ae5acc3cbc02eef558d8faa12e846.tar.xz
linux-dev-76a13da75d3ae5acc3cbc02eef558d8faa12e846.zip
platform/x86: intel-uncore-freq: Use sysfs_emit() to instead of scnprintf()
Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/20220923063314.239146-1-ye.xingchen@zte.com.cn Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
index 84eabd6156bb..cb24de9e97dc 100644
--- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
+++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
@@ -113,7 +113,7 @@ show_uncore_perf_status(current_freq_khz);
struct uncore_data *data = container_of(attr, struct uncore_data,\
member_name##_dev_attr);\
\
- return scnprintf(buf, PAGE_SIZE, "%u\n", \
+ return sysfs_emit(buf, "%u\n", \
data->member_name); \
} \