Skip to content

Commit 59e9910

Browse files
salah-trikikrzk
authored andcommitted
memory: bt1-l2-ctl: replace scnprintf() with sysfs_emit()
Documentation/filesystems/sysfs.rst mentions that show() should only use sysfs_emit() or sysfs_emit_at() when formating the value to be returned to user space. So replace scnprintf() with sysfs_emit(). Signed-off-by: Salah Triki <[email protected]> Link: https://lore.kernel.org/r/aBkw_p9GkH2fm2UJ@pc Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent bd4f5f6 commit 59e9910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/memory/bt1-l2-ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ static ssize_t l2_ctl_latency_show(struct device *dev,
222222
if (ret)
223223
return ret;
224224

225-
return scnprintf(buf, PAGE_SIZE, "%u\n", data);
225+
return sysfs_emit(buf, "%u\n", data);
226226
}
227227

228228
static ssize_t l2_ctl_latency_store(struct device *dev,

0 commit comments

Comments
 (0)