diff options
author | Xu Panda <xu.panda@zte.com.cn> | 2022-11-09 21:25:25 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-11-10 20:24:49 +0100 |
commit | 82d08d61e3a87527842392484e2d54c2aeb5fbb8 (patch) | |
tree | 9097c527c17b86f3e62f157a7a199357de69f69d /drivers/acpi/sysfs.c | |
parent | 4612c7f1387df2f9f20a28b2a271e6cb154eb2b9 (diff) |
ACPI: sysfs: use sysfs_emit() to instead of scnprintf()
Replace scnprintf() with sysfs_emit() to simplify the code.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
Signed-off-by: Yang Yang <yang.yang29@zte.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sysfs.c')
-rw-r--r-- | drivers/acpi/sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 2d81c742e4d2..7db3b530279b 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c @@ -198,7 +198,7 @@ static int param_set_trace_method_name(const char *val, static int param_get_trace_method_name(char *buffer, const struct kernel_param *kp) { - return scnprintf(buffer, PAGE_SIZE, "%s\n", acpi_gbl_trace_method_name); + return sysfs_emit(buffer, "%s\n", acpi_gbl_trace_method_name); } static const struct kernel_param_ops param_ops_trace_method = { |