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>
This commit is contained in:
Salah Triki 2025-05-05 22:43:26 +01:00 committed by Krzysztof Kozlowski
parent bd4f5f6c84
commit 59e9910e8e
1 changed files with 1 additions and 1 deletions

View File

@ -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,