Skip to content

Commit 82d08d6

Browse files
Xu Pandarafaeljw
authored andcommitted
ACPI: sysfs: use sysfs_emit() to instead of scnprintf()
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]>
1 parent 4612c7f commit 82d08d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int param_set_trace_method_name(const char *val,
198198

199199
static int param_get_trace_method_name(char *buffer, const struct kernel_param *kp)
200200
{
201-
return scnprintf(buffer, PAGE_SIZE, "%s\n", acpi_gbl_trace_method_name);
201+
return sysfs_emit(buffer, "%s\n", acpi_gbl_trace_method_name);
202202
}
203203

204204
static const struct kernel_param_ops param_ops_trace_method = {

0 commit comments

Comments
 (0)