summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorXu Panda <xu.panda@zte.com.cn>2022-11-09 16:25:25 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-11-10 22:24:49 +0300
commit82d08d61e3a87527842392484e2d54c2aeb5fbb8 (patch)
tree9097c527c17b86f3e62f157a7a199357de69f69d /drivers/acpi
parent4612c7f1387df2f9f20a28b2a271e6cb154eb2b9 (diff)
downloadlinux-82d08d61e3a87527842392484e2d54c2aeb5fbb8.tar.xz
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')
-rw-r--r--drivers/acpi/sysfs.c2
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 = {