]> Git Repo - linux.git/commitdiff
ACPI: sysfs: use sysfs_emit() to instead of scnprintf()
authorXu Panda <[email protected]>
Wed, 9 Nov 2022 13:25:25 +0000 (21:25 +0800)
committerRafael J. Wysocki <[email protected]>
Thu, 10 Nov 2022 19:24:49 +0000 (20:24 +0100)
Replace scnprintf() with sysfs_emit() to simplify the code.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Xu Panda <[email protected]>
Signed-off-by: Yang Yang <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/acpi/sysfs.c

index 2d81c742e4d2d57f2ab2382b1cb73dbc7786066c..7db3b530279bd531d6a1c31705a648bb9ad51ab4 100644 (file)
@@ -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 = {
This page took 0.070382 seconds and 4 git commands to generate.