Skip to content

Commit

Permalink
ACPI: sysfs: use sysfs_emit() to instead of scnprintf()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xu Panda authored and Rafael J. Wysocki committed Nov 10, 2022
1 parent 4612c7f commit 82d08d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 82d08d6

Please sign in to comment.