summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalah Triki <salah.triki@gmail.com>2025-05-06 00:43:26 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2025-05-07 08:44:13 +0300
commit59e9910e8e49230c71b22a75b527183957fc8df5 (patch)
tree88ed43bc6708cc657c6cc1ac00e51b2ce415ae57
parentbd4f5f6c84d074d9347b55731891729f136d35c8 (diff)
downloadlinux-59e9910e8e49230c71b22a75b527183957fc8df5.tar.xz
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 <salah.triki@gmail.com> Link: https://lore.kernel.org/r/aBkw_p9GkH2fm2UJ@pc Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
-rw-r--r--drivers/memory/bt1-l2-ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/memory/bt1-l2-ctl.c b/drivers/memory/bt1-l2-ctl.c
index 78bd71b203f2..0fd96abc172a 100644
--- a/drivers/memory/bt1-l2-ctl.c
+++ b/drivers/memory/bt1-l2-ctl.c
@@ -222,7 +222,7 @@ static ssize_t l2_ctl_latency_show(struct device *dev,
if (ret)
return ret;
- return scnprintf(buf, PAGE_SIZE, "%u\n", data);
+ return sysfs_emit(buf, "%u\n", data);
}
static ssize_t l2_ctl_latency_store(struct device *dev,